Unverified Commit 4392d3a9 authored by Ben Iofel's avatar Ben Iofel Committed by GitHub

feat(systemadmin): color `ip` if shell is interactive (#11107)

parent 94584e2a
......@@ -33,6 +33,14 @@ alias pscpu10='ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1,1n -nr | head
# top10 of the history
alias hist10='print -l ${(o)history%% *} | uniq -c | sort -nr | head -n 10'
function ip() {
if [ -t 1 ]; then
command ip -color "$@"
else
command ip "$@"
fi
}
# directory LS
function dls() {
print -l *(/)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment