about summary refs log tree commit diff
path: root/Completion/Zsh/Command
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2009-04-01 10:57:10 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2009-04-01 10:57:10 +0000
commit1e7c14ee356892a5f3576322b44f2724c9b73f5f (patch)
tree6cfe649cae6065f49bb75ea481c70a5490980889 /Completion/Zsh/Command
parent7df454402cbcdb6cccb082c97207eed5e3896583 (diff)
downloadzsh-1e7c14ee356892a5f3576322b44f2724c9b73f5f.tar.gz
zsh-1e7c14ee356892a5f3576322b44f2724c9b73f5f.tar.xz
zsh-1e7c14ee356892a5f3576322b44f2724c9b73f5f.zip
26801: add completion for calendar function
add tracking of precommand modifiers that are in effect
Diffstat (limited to 'Completion/Zsh/Command')
-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-- ))