Zsh: Edit get_ip to allow -4 or -6
This commit is contained in:
parent
e1b43bc618
commit
1074d5176d
|
@ -1,15 +1,17 @@
|
||||||
(( ${+commands[doas]} )) && function doasedit() {
|
doasedit () {
|
||||||
|
(( ${+commands[doas]} )) || return 1
|
||||||
doas -L
|
doas -L
|
||||||
doas $EDITOR /etc/doas.conf
|
doas $EDITOR /etc/doas.conf
|
||||||
doas doas -C /etc/doas.conf && echo "ok" || echo "error"
|
doas doas -C /etc/doas.conf && echo "ok" || echo "error"
|
||||||
doas -L
|
doas -L
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_ip() {
|
get_ip () {
|
||||||
wget -qO- "https://ipinfo.io"
|
(( ${+commands[wget]} )) || return 1
|
||||||
|
wget "$1" -qO- "https://ifconfig.co/json"
|
||||||
}
|
}
|
||||||
|
|
||||||
function pz_upgrade() {
|
pz_upgrade () {
|
||||||
pz zcompile -c >/dev/null
|
pz zcompile -c >/dev/null
|
||||||
pz pull
|
pz pull
|
||||||
pz zcompile >/dev/null
|
pz zcompile >/dev/null
|
||||||
|
|
Loading…
Reference in a new issue