From 8f017a3211a0313c5bc80c6e275d2ce9d2a63d6a Mon Sep 17 00:00:00 2001 From: tastytea Date: Mon, 18 Apr 2022 05:42:55 +0200 Subject: [PATCH] readwwwlog: Use elif --- .config/zsh/functions/readwwwlog | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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