diff --git a/.config/zsh/functions/readwwwlog b/.config/zsh/functions/readwwwlog index 6c924f0..47dadba 100755 --- a/.config/zsh/functions/readwwwlog +++ b/.config/zsh/functions/readwwwlog @@ -20,11 +20,9 @@ local termopts="" for url in ${urls}; do if [[ ${url} =~ 'dpaste\.com' && ! ${url[-4,-1]} == ".txt" ]]; then url+=".txt" - fi - if [[ ${url} =~ 'pastebin\.com' && ! ${url} =~ '/raw/' ]]; then + elif [[ ${url} =~ 'pastebin\.com' && ! ${url} =~ '/raw/' ]]; then url="https://pastebin.com/raw/${url##*/}" - fi - if [[ ${url} =~ 'irccloud\.com' && ! ${url} =~ '/raw/' ]]; then + elif [[ ${url} =~ 'irccloud\.com' && ! ${url} =~ '/raw/' ]]; then local id=${${(@s:/:)url}[4]} url="https://www.irccloud.com/pastebin/raw/${id}" fi