about summary refs log tree commit diff
path: root/Completion/Zsh/Command
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:32:47 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:32:47 +0000
commite0db73cb619a9010e2836ef3234c980dbe29d0f2 (patch)
tree251c1e7cd2dc62ae84e1ba01719864e2ae7294a6 /Completion/Zsh/Command
parentdfec1f2e334c5d2b3b1bd6c9fb1158c70142fb1d (diff)
downloadzsh-e0db73cb619a9010e2836ef3234c980dbe29d0f2.tar.gz
zsh-e0db73cb619a9010e2836ef3234c980dbe29d0f2.tar.xz
zsh-e0db73cb619a9010e2836ef3234c980dbe29d0f2.zip
moved from Completion/Builtins/_zcompile
Diffstat (limited to 'Completion/Zsh/Command')
-rw-r--r--Completion/Zsh/Command/_zcompile26
1 files changed, 26 insertions, 0 deletions
diff --git a/Completion/Zsh/Command/_zcompile b/Completion/Zsh/Command/_zcompile
new file mode 100644
index 000000000..2d8e6d033
--- /dev/null
+++ b/Completion/Zsh/Command/_zcompile
@@ -0,0 +1,26 @@
+#compdef zcompile
+
+local state line expl curcontext="$curcontext" ret=1
+typeset -A opt_args
+
+_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]' \
+    '(-t -c -z -m -a)-k[ksh-style autoloading]' \
+    '(-t -c -k -m -a)-z[zsh-style autoloading]' \
+    '(-t -U -z -k)-c[currently defined functions]' \
+    '(-t -U -z -k)-m[use names as patterns]' \
+    '(-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' && ret=0
+
+if (( $+opt_args[-c] )); then
+  _wanted functions expl 'function to write' compadd -k functions && ret=0
+else
+  _description files expl 'zsh source file'
+  _files "$expl[@]" && ret=0
+fi
+
+return ret