From 99a5f9995fda0e40a084fd222244e87c8fec58bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Thu, 22 Aug 2024 20:04:52 +0300 Subject: [PATCH] Update bash-function: Skip shift if no args --- share/bash-function.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/bash-function.txt b/share/bash-function.txt index f25cd92..0bbb414 100644 --- a/share/bash-function.txt +++ b/share/bash-function.txt @@ -20,7 +20,7 @@ fi wttr() { local location="${1// /+}" - shift + test "$#" -gt 0 && shift local args="" for p in $WTTR_PARAMS "$@"; do args+=" --data-urlencode $p "