Zsh: Switch to curl
This commit is contained in:
parent
3185a5bbf0
commit
4a403c123c
|
@ -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"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue