1
0
Fork 0

readwwwlog: Remove trailing slash

This commit is contained in:
tastytea 2022-05-24 00:22:55 +02:00
parent 88226b592c
commit 915c6a7cda
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
1 changed files with 1 additions and 0 deletions

View File

@ -21,6 +21,7 @@ local default_cmd="firefox"
local termopts=""
for url in ${urls}; do
[[ ${url[-1]} == "/" ]] && url=${url[1,-2]} # Remove trailing slash (safe?)
local id=${url##*/} # Most paste services have the ID as the last element
if [[ ${url} =~ 'dpaste\.com' && ! ${url[-4,-1]} == ".txt" ]]; then