Utilize _comma_separated function to squash code a bit
This commit is contained in:
parent
ab53d842a9
commit
f73ebdc3a7
12
src/_ps
12
src/_ps
|
@ -2,6 +2,18 @@
|
||||||
|
|
||||||
# This works with procps version 3.2.8
|
# This works with procps version 3.2.8
|
||||||
|
|
||||||
|
# This depends on the _comma_separated function, which should be available from the same
|
||||||
|
# place you got this file. If it isn't then you can uncomment the following lines to define
|
||||||
|
# the function:
|
||||||
|
#
|
||||||
|
# _comma_separated()
|
||||||
|
# {
|
||||||
|
# compset -P '*,'
|
||||||
|
# local -a used vals
|
||||||
|
# used=(${(s:,:)IPREFIX})
|
||||||
|
# _wanted tty expl $1 compadd -S ',' -q -F used "$@[2,-1]"
|
||||||
|
# }
|
||||||
|
|
||||||
local context state state_descr line
|
local context state state_descr line
|
||||||
typeset -A opt_args
|
typeset -A opt_args
|
||||||
local filterexcl="(-A -a -C -d -e -g -G --group --Group -p --pid --ppid -s --sid -t --tty -u -U --user --User)"
|
local filterexcl="(-A -a -C -d -e -g -G --group --Group -p --pid --ppid -s --sid -t --tty -u -U --user --User)"
|
||||||
|
|
Loading…
Reference in New Issue