about summary refs log tree commit diff
path: root/Completion/Builtins/_zcompile
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2001-04-01 16:19:15 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2001-04-01 16:19:15 +0000
commitb9c58a73ac2eace89340b268db852c8a158bd707 (patch)
treeca4e713df765174bc90fcc2e8c2a3be9288905de /Completion/Builtins/_zcompile
parente6be1f76cf77a63dd79dbe3d6eea62815caa87ab (diff)
downloadzsh-b9c58a73ac2eace89340b268db852c8a158bd707.tar.gz
zsh-b9c58a73ac2eace89340b268db852c8a158bd707.tar.xz
zsh-b9c58a73ac2eace89340b268db852c8a158bd707.zip
various doc fixes and minor completion function changes, most of which
are to use the -A "-*" and -S options to _arguments (13863)
Diffstat (limited to 'Completion/Builtins/_zcompile')
-rw-r--r--Completion/Builtins/_zcompile12
1 files changed, 7 insertions, 5 deletions
diff --git a/Completion/Builtins/_zcompile b/Completion/Builtins/_zcompile
index e9b9c60eb..2d8e6d033 100644
--- a/Completion/Builtins/_zcompile
+++ b/Completion/Builtins/_zcompile
@@ -1,9 +1,9 @@
 #compdef zcompile
 
-local state line expl curcontext="$curcontext"
+local state line expl curcontext="$curcontext" ret=1
 typeset -A opt_args
 
-_arguments -C -s \
+_arguments -C -s -A "-*" -S \
     '(-t -c -m -a)-U[don'\''t expand aliases]' \
     '(-t -M)-R[mark as read]' \
     '(-t -R)-M[mark as mapped]' \
@@ -14,11 +14,13 @@ _arguments -C -s \
     '(-t -U -z -k)-a[write autoload functions]' \
     '(-M -R -U -z -k -a -c -m)-t[show table of contents]' \
     ':zwc file:_files' \
-    '*:function:->function' && return 0
+    '*:function:->function' && ret=0
 
 if (( $+opt_args[-c] )); then
-  _wanted functions expl 'function to write' compadd -k functions
+  _wanted functions expl 'function to write' compadd -k functions && ret=0
 else
   _description files expl 'zsh source file'
-  _files "$expl[@]"
+  _files "$expl[@]" && ret=0
 fi
+
+return ret