Merge pull request #1013 from glensc/patch-1

Fix bash-function: Fix under zsh
pull/1052/head
Igor Chubin 3 weeks ago committed by GitHub
commit df2dcbbc52
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -20,12 +20,12 @@ fi
wttr() { wttr() {
local location="${1// /+}" local location="${1// /+}"
command shift test "$#" -gt 0 && shift
local args="" local args=()
for p in $WTTR_PARAMS "$@"; do for p in $WTTR_PARAMS "$@"; do
args+=" --data-urlencode $p " args+=("--data-urlencode" "$p")
done done
curl -fGsS -H "Accept-Language: ${LANG%_*}" $args --compressed "wttr.in/${location}" curl -fGsS -H "Accept-Language: ${LANG%_*}" "${args[@]}" --compressed "wttr.in/${location}"
} }
wttr "$@" wttr "$@"

Loading…
Cancel
Save