summaryrefslogtreecommitdiff
path: root/Completion/Solaris/Command/_pfexec
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Solaris/Command/_pfexec')
-rw-r--r--Completion/Solaris/Command/_pfexec12
1 files changed, 8 insertions, 4 deletions
diff --git a/Completion/Solaris/Command/_pfexec b/Completion/Solaris/Command/_pfexec
index 2519c3cdc..e90f33222 100644
--- a/Completion/Solaris/Command/_pfexec
+++ b/Completion/Solaris/Command/_pfexec
@@ -22,11 +22,15 @@ _privset() {
}
_pfexec() {
+ local cmd cpp
local -a _comp_priv_prefix
- _arguments \
- '-P[privileges to acquire]:privspec:_privset' \
- '(-):command name: _command_names -e' \
- '*::arguments:{ _comp_priv_prefix=( pfexec ${(kv)opt_args[-P]} ) ; _normal }'
+ local -A opt_args
+ cmd="$words[1]"
+ cpp='_comp_priv_prefix=( $cmd ${(kv)opt_args[(I)-P]} )'
+ _arguments \
+ '-P+[privileges to acquire]:privspec:_privset' \
+ "(-): :{ $cpp; _command_names -e }" \
+ "*:: :{ $cpp; _normal }"
}
_pfexec "$@"