diff --git a/zsh/.config/zsh/functions.zsh b/zsh/.config/zsh/functions.zsh index e1eab14..55e64e2 100644 --- a/zsh/.config/zsh/functions.zsh +++ b/zsh/.config/zsh/functions.zsh @@ -8,8 +8,7 @@ doasedit() { } get_ip() { - (( ${+commands[wget]} )) || return 1 - + (( ${+commands[jq]} )) && local JQ="| jq" local IP="" local ARGS="" @@ -18,5 +17,5 @@ get_ip() { shift done - eval "wget $ARGS -qO- 'https://ifconfig.co/json$IP'" + eval "curl $ARGS -fsSL 'https://ifconfig.co/json$IP' $JQ" }