summaryrefslogtreecommitdiff
path: root/Completion/Builtins/_zcompile
diff options
context:
space:
mode:
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