aboutsummaryrefslogtreecommitdiffstats
path: root/src/_tmuxinator
diff options
context:
space:
mode:
authorJulien Nicoulaud <julien.nicoulaud@gmail.com>2012-08-01 13:23:11 +0200
committerJulien Nicoulaud <julien.nicoulaud@gmail.com>2012-08-01 13:23:11 +0200
commit10ffeb0c153258896531b2b8939e94486d58b378 (patch)
treef735059d34c7f2ade7eb410643f39ecf402833d9 /src/_tmuxinator
parentAdd call for deb and rpm packagers (diff)
downloadzsh-completions-10ffeb0c153258896531b2b8939e94486d58b378.tar
zsh-completions-10ffeb0c153258896531b2b8939e94486d58b378.tar.gz
zsh-completions-10ffeb0c153258896531b2b8939e94486d58b378.tar.bz2
zsh-completions-10ffeb0c153258896531b2b8939e94486d58b378.tar.lz
zsh-completions-10ffeb0c153258896531b2b8939e94486d58b378.tar.xz
zsh-completions-10ffeb0c153258896531b2b8939e94486d58b378.tar.zst
zsh-completions-10ffeb0c153258896531b2b8939e94486d58b378.zip
[BREAKING CHANGE] Move compdefs to own directory (to ease packaging and
avoid bloating users fpath with unneeded files such as README.md)
Diffstat (limited to 'src/_tmuxinator')
-rw-r--r--src/_tmuxinator55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/_tmuxinator b/src/_tmuxinator
new file mode 100644
index 0000000..75d6ab3
--- /dev/null
+++ b/src/_tmuxinator
@@ -0,0 +1,55 @@
+#compdef tmuxinator mux
+# ------------------------------------------------------------------------------
+# Description
+# -----------
+#
+# Completion script for tmuxinator (https://github.com/aziz/tmuxinator).
+#
+# Source: https://gist.github.com/2242920
+#
+# ------------------------------------------------------------------------------
+# Authors
+# -------
+#
+# * ser1zw (https://github.com/ser1zw)
+# * Ben O'Hara (https://github.com/benohara)
+#
+# ------------------------------------------------------------------------------
+# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
+# vim: ft=zsh sw=2 ts=2 et
+# ------------------------------------------------------------------------------
+
+_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'
+ )
+
+ if (( CURRENT == 2 )); then
+ _describe -t commands 'commands' commands
+ elif (( CURRENT == 3 )); then
+ case $words[2] in
+ copy|delete|open|start)
+ _arguments '*:projects:($projects)'
+ ;;
+ list)
+ _arguments '-v[verbose]' # FIXME: doesn't work well
+ ;;
+ esac
+ fi
+
+ return 0
+}
+
+_tmuxinator \ No newline at end of file