diff --git a/config/scripts/lip b/config/scripts/lip index a30eee4..66a0b1d 100755 --- a/config/scripts/lip +++ b/config/scripts/lip @@ -6,14 +6,15 @@ url="https://ip.frogeye.fr/json" cachedir="$HOME/.cache/lip" ip="${1:-}" -if [ $# -gt 0 ] +jq_sel="del(.user_agent)" + +if [ $# -gt 1 ] then shift jq_sel="$@" -else - jq_sel="del(.user_agent)" fi + if [ -n "$ip" ] then cachefile="$cachedir/$ip"