d88fbe625f0a7c6f7296a58e0cd919903cd81511

Author
Grégory DAVID <632571+groolot@users.noreply.github.com>
Committer
GitHub <noreply@github.com>
Date

Message

systemadmin: fix header line sorting in pscpu (#6167)

Inside `pscpu` and `pscpu10` aliases, remove sorting of the header line.

Diff

 1diff --git a/plugins/systemadmin/systemadmin.plugin.zsh b/plugins/systemadmin/systemadmin.plugin.zsh
 2index bdc2219fa57fd61e600a65ed5ead5923dc198916..ded25c3a9c11bdcca3195c1623eab9d123b12d84 100644
 3--- a/plugins/systemadmin/systemadmin.plugin.zsh
 4+++ b/plugins/systemadmin/systemadmin.plugin.zsh
 5@@ -28,8 +28,8 @@ alias mkdir='mkdir -pv'
 6 alias psmem='ps -e -orss=,args= | sort -b -k1,1n'
 7 alias psmem10='ps -e -orss=,args= | sort -b -k1,1n| head -10'
 8 # get top process eating cpu if not work try excute : export LC_ALL='C'
 9-alias pscpu='ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1 -nr'
10-alias pscpu10='ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1 -nr | head -10'
11+alias pscpu='ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1,1n -nr'
12+alias pscpu10='ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1,1n -nr | head -10'
13 # top10 of the history
14 alias hist10='print -l ${(o)history%% *} | uniq -c | sort -nr | head -n 10'
15