Utilize _comma_separated function to squash code a bit
This commit is contained in:
parent
ab53d842a9
commit
f73ebdc3a7
14
src/_ps
14
src/_ps
|
@ -1,6 +1,18 @@
|
||||||
#compdef ps
|
#compdef ps
|
||||||
|
|
||||||
# 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
|
||||||
|
|
Loading…
Reference in New Issue