zsh alias to function

This commit is contained in:
thek4n 2024-12-13 20:05:54 +03:00
parent 89daf17b92
commit 251e88a000
2 changed files with 5 additions and 1 deletions

View File

@ -88,7 +88,6 @@ alias wget='wget -c'
# alias myip='curl ipinfo.io/ip' # alias myip='curl ipinfo.io/ip'
alias myip='dig +short myip.opendns.com @resolver1.opendns.com' alias myip='dig +short myip.opendns.com @resolver1.opendns.com'
alias sprunge='curl -F "sprunge=<-" http://sprunge.us 2>/dev/null' # CLI pastebin alias sprunge='curl -F "sprunge=<-" http://sprunge.us 2>/dev/null' # CLI pastebin
alias weather='(curl -4 wttr.in/$(cat) 2>/dev/null | head -n -1) <<<'
alias ip='ip -c' alias ip='ip -c'
alias fastping='ping -c 100 -i 0.1' alias fastping='ping -c 100 -i 0.1'

View File

@ -293,4 +293,9 @@ sha() {
else else
shasum -a 256 | head -c 64 shasum -a 256 | head -c 64
fi fi
}
weather() {
local city="${1}"
curl "wttr.in/${city}" 2>/dev/null | head -n -1
} }