diff options
| author | Christopher Chow <chris@chowie.net> | 2015-02-28 10:13:00 +1100 |
|---|---|---|
| committer | Christopher Chow <chris@chowie.net> | 2015-02-28 10:20:31 +1100 |
| commit | ae67d3c525a2b2baed515e156c1b5fd6d4b44f2a (patch) | |
| tree | b58d6ce568cc22634f092009d076cafa637e399d /src/_tmuxinator | |
| parent | Merge pull request #295 from superbrothers/fix-typo (diff) | |
| download | zsh-completions-ae67d3c525a2b2baed515e156c1b5fd6d4b44f2a.tar zsh-completions-ae67d3c525a2b2baed515e156c1b5fd6d4b44f2a.tar.gz zsh-completions-ae67d3c525a2b2baed515e156c1b5fd6d4b44f2a.tar.bz2 zsh-completions-ae67d3c525a2b2baed515e156c1b5fd6d4b44f2a.tar.lz zsh-completions-ae67d3c525a2b2baed515e156c1b5fd6d4b44f2a.tar.xz zsh-completions-ae67d3c525a2b2baed515e156c1b5fd6d4b44f2a.tar.zst zsh-completions-ae67d3c525a2b2baed515e156c1b5fd6d4b44f2a.zip | |
Update tmuxinator completions
tmuxinator 0.6.10 provides a completions sub command to use for
completion purposes.
Diffstat (limited to 'src/_tmuxinator')
| -rw-r--r-- | src/_tmuxinator | 38 |
1 files changed, 10 insertions, 28 deletions
diff --git a/src/_tmuxinator b/src/_tmuxinator index 41fc7c2..d85b6ef 100644 --- a/src/_tmuxinator +++ b/src/_tmuxinator @@ -3,51 +3,33 @@ # Description # ----------- # -# Completion script for tmuxinator (https://github.com/aziz/tmuxinator). -# -# Source: https://gist.github.com/2242920 +# Completion script for tmuxinator (https://github.com/tmuxinator/tmuxinator) # # ------------------------------------------------------------------------------ # Authors # ------- # -# * ser1zw (https://github.com/ser1zw) -# * Ben O'Hara (https://github.com/benohara) +# * Christopher Chow (https://github.com/Soliah) # # ------------------------------------------------------------------------------ _tmuxinator() { - local -a projects - projects=(`find $HOME/.tmuxinator/ -name \*.yml| awk -F/ '{print $NF}' | sed s:.yml::g`) - - local -a commands - commands=( - 'start:start a tmux session using project'\''s tmuxinator config' - 'open:create a new project file and open it in your editor' - 'copy:copy source_project project file to a new project called new_project' - 'delete:deletes the project called project_name' - 'implode:deletes all existing projects!' - 'list:list all existing projects' - 'doctor:look for problems in your configuration' - 'help:shows this help document' - 'version:shows tmuxinator version number' - ) + local commands projects + commands=(${(f)"$(tmuxinator commands zsh)"}) + projects=(${(f)"$(tmuxinator completions start)"}) if (( CURRENT == 2 )); then - _describe -t commands 'commands' commands - _describe -t projects 'projects' projects - elif (( CURRENT == 3 )); then + _describe -t commands "tmuxinator subcommands" commands + _describe -t projects "tmuxinator projects" projects + elif (( CURRENT == 3)); then case $words[2] in - copy|delete|open|start) + copy|debug|delete|open|start) _arguments '*:projects:($projects)' ;; - list) - _arguments '-v[verbose]' # FIXME: doesn't work well - ;; esac fi - return 0 + return } _tmuxinator |
