mirror of
https://gitee.com/mirrors/ohmyzsh.git
synced 2026-10-15 02:56:45 +08:00
feat(systemadmin): color ip if shell is interactive (#11107)
This commit is contained in:
1 parent
94584e2a73
commit
4392d3a923
1 file changed
+8
@@ -33,6 +33,14 @@ alias pscpu10='ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1,1n -nr | head
|
|||||||
# top10 of the history
|
# top10 of the history
|
||||||
alias hist10='print -l ${(o)history%% *} | uniq -c | sort -nr | head -n 10'
|
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
|
# directory LS
|
||||||
function dls() {
|
function dls() {
|
||||||
print -l *(/)
|
print -l *(/)
|
||||||
|
|||||||
Reference in new issue
Block a user