summary refs log tree commit diff
path: root/Completion/Base
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Base')
-rw-r--r--Completion/Base/Core/_normal13
1 files changed, 5 insertions, 8 deletions
diff --git a/Completion/Base/Core/_normal b/Completion/Base/Core/_normal
index dd607d2b2..fe336e303 100644
--- a/Completion/Base/Core/_normal
+++ b/Completion/Base/Core/_normal
@@ -1,13 +1,10 @@
 #compdef -command-line-
 
-local _comp_command1 _comp_command2 _comp_command skip
+local _comp_command1 _comp_command2 _comp_command
+local -A opts
 
-if [[ "$1" = -s ]]; then
-  skip=(-s)
-else
-  skip=()
-  _compskip=''
-fi
+zparseopts -A opts -D - s
+(( $+opts[-s] )) || _compskip=
 
 # Check for a history reference to complete modifiers.
 # $PREFIX has a quoted form of the !, so we can't test that
@@ -37,5 +34,5 @@ fi
 
 _set_command
 
-_dispatch "$skip[@]" "$_comp_command" \
+_dispatch ${(k)opts[-s]} "$_comp_command" \
           "$_comp_command1" "$_comp_command2" -default-