about summary refs log tree commit diff
path: root/Completion/Zsh
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Zsh')
-rw-r--r--Completion/Zsh/Command/_command2
-rw-r--r--Completion/Zsh/Command/_precommand3
2 files changed, 5 insertions, 0 deletions
diff --git a/Completion/Zsh/Command/_command b/Completion/Zsh/Command/_command
index 72d7b6e99..7cfb52c2f 100644
--- a/Completion/Zsh/Command/_command
+++ b/Completion/Zsh/Command/_command
@@ -2,6 +2,8 @@
 
 local ret
 
+# indicate if this is a precommand modifier
+[[ $service = command ]] && precommands+=(command)
 if [[ CURRENT -ge 3 ]]; then
   compset -n 2
   _normal && ret=0
diff --git a/Completion/Zsh/Command/_precommand b/Completion/Zsh/Command/_precommand
index f45688fc7..12f45ca31 100644
--- a/Completion/Zsh/Command/_precommand
+++ b/Completion/Zsh/Command/_precommand
@@ -1,5 +1,8 @@
 #compdef - nohup eval time rusage noglob nocorrect exec catchsegv aoss
 
+# precommands is made local in _main_complete
+precommands+=($words[1])
+
 shift words
 (( CURRENT-- ))