Utilize _comma_separated function to squash code a bit

This commit is contained in:
Joe Bloggs 2014-03-20 14:47:24 +00:00
parent ab53d842a9
commit f73ebdc3a7
1 changed files with 13 additions and 1 deletions

14
src/_ps
View File

@ -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