aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorAlexis Hovorka <[email protected]>2021-02-18 17:58:49 -0700
committerAlexis Hovorka <[email protected]>2021-02-18 17:58:49 -0700
commit386020adb0eaf8098bcef74a36a26f152edd702b (patch)
tree737d9a21178ab720cd572197df0063af3d2f81e7 /base
parent7ef4d005e6904fac650efc145fc4121ce50debdd (diff)
[style] Tweak arguments and display of wttr
Diffstat (limited to 'base')
-rw-r--r--base/zsh/functions.zsh4
1 files changed, 3 insertions, 1 deletions
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"
}