* PATCH: don't sort processes in _pids
@ 2011-05-09 21:57 Mikael Magnusson
0 siblings, 0 replies; only message in thread
From: Mikael Magnusson @ 2011-05-09 21:57 UTC (permalink / raw)
To: zsh workers
I use this style to show processes using the most cpu first when completing pids
zstyle ':completion:*:processes' command 'ps aux --sort=-%cpu'
but it doesn't work, because it gets resorted lexicographically, stop
doing that. As the default output of ps is to sort by pid, I don't
think this makes the uncustomized scenario worse than before.
diff --git a/Completion/Unix/Type/_pids b/Completion/Unix/Type/_pids
index ea5ed79..3f99dfd 100644
--- a/Completion/Unix/Type/_pids
+++ b/Completion/Unix/Type/_pids
@@ -37,7 +37,7 @@ else
desc=()
fi
-_wanted processes expl 'process ID' \
+_wanted -V processes expl 'process ID' \
compadd "$@" "$desc[@]" "$all[@]" -a - pids && ret=0
if [[ -n "$all" ]]; then
--
Mikael Magnusson
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-05-09 21:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-09 21:57 PATCH: don't sort processes in _pids Mikael Magnusson
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).