diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2023-01-17 12:46:15 +0100 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2023-01-17 12:46:15 +0100 |
commit | db7efd2336e4dbe6abf321b00dbc11bc5afb1355 (patch) | |
tree | 720a58ff82bf0a0e0167594131f872d453b1828e /plugins/systemadmin | |
parent | 04b8c052e5b624873b352889423c753ed1baf9c4 (diff) | |
parent | 8f0e296dbf27026ea0515ebae0d3cc41f236ecdc (diff) | |
download | zsh-db7efd2336e4dbe6abf321b00dbc11bc5afb1355.tar.gz zsh-db7efd2336e4dbe6abf321b00dbc11bc5afb1355.tar.bz2 zsh-db7efd2336e4dbe6abf321b00dbc11bc5afb1355.zip |
Merge remote-tracking branch 'github/master'
Diffstat (limited to 'plugins/systemadmin')
-rw-r--r-- | plugins/systemadmin/systemadmin.plugin.zsh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/systemadmin/systemadmin.plugin.zsh b/plugins/systemadmin/systemadmin.plugin.zsh index 8e5e0af71..9b5159ff1 100644 --- a/plugins/systemadmin/systemadmin.plugin.zsh +++ b/plugins/systemadmin/systemadmin.plugin.zsh @@ -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 *(/) |