From 386020adb0eaf8098bcef74a36a26f152edd702b Mon Sep 17 00:00:00 2001 From: Alexis Hovorka Date: Thu, 18 Feb 2021 17:58:49 -0700 Subject: [style] Tweak arguments and display of wttr --- base/zsh/functions.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/base/zsh/functions.zsh b/base/zsh/functions.zsh index 9f02ffa..4419c6e 100644 --- a/base/zsh/functions.zsh +++ b/base/zsh/functions.zsh @@ -17,8 +17,10 @@ function trash { # 43 0 * * 3 find ~/.trash -mindepth 1 -mtime +90 -delete wttr() { + if [[ -z "$1$2" ]]; then 2="m0q" + elif [[ -z "$2" ]]; then echo; fi curl -q -s --compressed -H "Accept-Language: ${LANG%_*}" \ - "https://wttr.in/${1:-Pleasant Grove}?${2:-0q}" + "https://wttr.in/${1:-Pleasant Grove}?${2:-m0Q}" # "format=%l%0A%c+%t+%w+%m" } -- cgit v1.2.3-54-g00ecf