diff --git a/.config/zsh/functions/readwwwlog b/.config/zsh/functions/readwwwlog index 002d0df..4ef591b 100755 --- a/.config/zsh/functions/readwwwlog +++ b/.config/zsh/functions/readwwwlog @@ -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