ipaddr: forcer la sortie couleur
This commit is contained in:
parent
af1bdd3ca5
commit
f4047a3b64
4
ipaddr
4
ipaddr
|
@ -7,7 +7,9 @@ elif [ -x /bin/ip ]; then IP=/bin/ip
|
||||||
else IP=ip
|
else IP=ip
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tty -s <&1 && isatty=1 || isatty=
|
if [ -n "IPADDR_COLOR" ]; then isatty=1
|
||||||
|
else tty -s <&1 && isatty=1 || isatty=
|
||||||
|
fi
|
||||||
|
|
||||||
"$IP" addr "$@" | awk -v isatty="$isatty" '
|
"$IP" addr "$@" | awk -v isatty="$isatty" '
|
||||||
isatty && $0 ~ /^[0-9]/ {
|
isatty && $0 ~ /^[0-9]/ {
|
||||||
|
|
Loading…
Reference in New Issue