diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2015-11-25 18:51:00 +0100 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2015-11-25 18:51:00 +0100 |
commit | 317ec32cb1cbd15b31e17bcb07f09c52cd37c44a (patch) | |
tree | 88a02c853dfafd82a2d551d862d8dfb056b1bee6 /Completion/Unix/Command/_zsh | |
parent | 1637291aaea12ddcfd549d50d49c480185995c1a (diff) | |
parent | cce4261a3c6f4bf78b483db61623c80e3c98d10b (diff) | |
download | zsh-317ec32cb1cbd15b31e17bcb07f09c52cd37c44a.tar.gz zsh-317ec32cb1cbd15b31e17bcb07f09c52cd37c44a.zip |
Merge tag 'zsh-5.1.1-test-1' into debian
Diffstat (limited to 'Completion/Unix/Command/_zsh')
-rw-r--r-- | Completion/Unix/Command/_zsh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_zsh b/Completion/Unix/Command/_zsh new file mode 100644 index 000000000..a5414670b --- /dev/null +++ b/Completion/Unix/Command/_zsh @@ -0,0 +1,23 @@ +#compdef zsh + +local curcontext=$curcontext state state_descr line expl +typeset -A opt_args + +_arguments -S -s : \ + '*-o+[set named option]:option:_options' \ + '*+o+[unset named option]:option:_options' \ + '(1 -s --shinstdin)'{-s,--shinstdin}'[read commands from standard input]' \ + '(-)-b[end of option processing, like --]' \ + '(1 -)-c[run a command]:command:_cmdstring' \ + '(-)1:script file:_files' \ + '*::script arguments:->args' -- && return 0 + +case $state in + (args) + if [[ -n ${opt_args[(I)-c|-s|--shinstdin]} ]]; then + _files + else + _normal + fi + ;; +esac |