diff options
| author | Kazuya Takeshima <mail@mitukiii.jp> | 2013-05-24 16:11:06 +0900 |
|---|---|---|
| committer | Kazuya Takeshima <mail@mitukiii.jp> | 2013-05-24 16:11:06 +0900 |
| commit | 1c667bfebb614728a82d812ede41111087854338 (patch) | |
| tree | 532823a9a624bd771270f8f24baedfff97342bef /src/_mina | |
| parent | Merge pull request #134 from zhaocai/feature/_gem (diff) | |
| download | zsh-completions-1c667bfebb614728a82d812ede41111087854338.tar zsh-completions-1c667bfebb614728a82d812ede41111087854338.tar.gz zsh-completions-1c667bfebb614728a82d812ede41111087854338.tar.bz2 zsh-completions-1c667bfebb614728a82d812ede41111087854338.tar.lz zsh-completions-1c667bfebb614728a82d812ede41111087854338.tar.xz zsh-completions-1c667bfebb614728a82d812ede41111087854338.tar.zst zsh-completions-1c667bfebb614728a82d812ede41111087854338.zip | |
Add mina completion.
Diffstat (limited to 'src/_mina')
| -rw-r--r-- | src/_mina | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/_mina b/src/_mina new file mode 100644 index 0000000..2a8d935 --- /dev/null +++ b/src/_mina @@ -0,0 +1,43 @@ +#compdef mina +# ------------------------------------------------------------------------------ +# Description +# ----------- +# +# Completion script for Mina (http://nadarei.co/mina/). +# +# ------------------------------------------------------------------------------ +# Authors +# ------- +# +# * Kazuya Takeshima (https://github.com/mitukiii) +# +# ------------------------------------------------------------------------------ + + +local curcontext="$curcontext" state line cmds ret=1 + +_arguments -C \ + {-h,--help}'[Show help]' \ + {-V,--version}'[Show program version]' \ + {-v,--verbose}'[Show commands as they happen]' \ + {-s,--simulate}'[Run in simulation mode]' \ + {-t,--trace}'[Show backtraces when errors occur]' \ + -f'[Use FILE as the deploy configuration]:file:_files' \ + '*: :->cmds' && ret=0 + +case $state in + cmds) + cmds=( ${(f)"$(_call_program commands mina -T 2> /dev/null | sed -e 's/:/\\:/g; s/\[/\\[/g; s/\]/\\]/g; s/mina \([^ ]*\) .*# /\1:/g')"} ) + _describe -t commands 'mina command' cmds && ret=0 + ;; +esac + +return ret + +# Local Variables: +# mode: Shell-Script +# sh-indentation: 2 +# indent-tabs-mode: nil +# sh-basic-offset: 2 +# End: +# vim: ft=zsh sw=2 ts=2 et |
