openbsd-ports/shells/zsh/patches/patch-Completion_Unix_Command__pgrep
pea fbb7213416 Update to 4.3.15.
Add a diff to fix pgrep completion (from Antti Harri, thanks)

ok ajacoutot@
2011-12-21 15:01:56 +00:00

43 lines
1.4 KiB
Plaintext

$OpenBSD: patch-Completion_Unix_Command__pgrep,v 1.1 2011/12/21 15:01:56 pea Exp $
--- Completion/Unix/Command/_pgrep.orig Thu Dec 15 11:46:32 2011
+++ Completion/Unix/Command/_pgrep Thu Dec 15 11:48:21 2011
@@ -45,7 +45,7 @@ case $state in
local -a used sid
used=(${(s:,:)IPREFIX})
- sid=(${(uon)$(ps -A o sid=)})
+ sid=(${(uon)$(ps -ax -o pid)})
_wanted sid expl 'session id' compadd -S ',' -q -F used $sid
;;
@@ -55,7 +55,7 @@ case $state in
local -a used ppid
used=(${(s:,:)IPREFIX})
- ppid=(${(uon)$(ps -A o ppid=)})
+ ppid=(${(uon)$(ps -ax -o ppid)})
_wanted ppid expl 'parent process id' compadd -S ',' -q -F used $ppid
;;
@@ -65,7 +65,7 @@ case $state in
local -a used pgid
used=(${(s:,:)IPREFIX})
- pgid=(${(uon)$(ps -A o pgid=)})
+ pgid=(${(uon)$(ps -ax -o pgid)})
_wanted pgid expl 'process group id' compadd -S ',' -q -F used $pgid
;;
@@ -78,9 +78,9 @@ case $state in
fi
if (( ${+opt_args[-f]} ))
then
- _wanted pname expl $ispat'process command line' compadd ${(u)${(f)"$(ps -A o cmd=)"}}
+ _wanted pname expl $ispat'process command line' compadd ${(u)${(f)"$(ps -ax -o command)"}}
else
- _wanted pname expl $ispat'process name' compadd ${(u)${(f)"$(ps -A co cmd=)"}}
+ _wanted pname expl $ispat'process name' compadd ${(u)${(f)"$(ps -ax -co command)"}}
fi
;;