From 4a403c123c23e5b2ce3392ae2e76ab4246a8347d Mon Sep 17 00:00:00 2001 From: theanonymousexyz Date: Sun, 3 Apr 2022 21:46:06 +0200 Subject: [PATCH] Zsh: Switch to curl --- zsh/.config/zsh/functions.zsh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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" }