From 321200d708027b56e95525cba3d4a6bb3d86983e Mon Sep 17 00:00:00 2001 From: Peter Butkovic Date: Tue, 12 Jun 2018 19:19:59 +0200 Subject: added tmuxinator aliases (#3147) --- plugins/tmuxinator/tmuxinator.plugin.zsh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 plugins/tmuxinator/tmuxinator.plugin.zsh (limited to 'plugins/tmuxinator') diff --git a/plugins/tmuxinator/tmuxinator.plugin.zsh b/plugins/tmuxinator/tmuxinator.plugin.zsh new file mode 100644 index 000000000..166fa9881 --- /dev/null +++ b/plugins/tmuxinator/tmuxinator.plugin.zsh @@ -0,0 +1,5 @@ +# aliases +alias txs='tmuxinator start' +alias txo='tmuxinator open' +alias txn='tmuxinator new' +alias txl='tmuxinator list' -- cgit v1.2.3-70-g09d2 From 7a9bab1d77e2c22c331ce98a7245d0ba5d348353 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Tue, 12 Jun 2018 19:20:10 +0200 Subject: Update tmuxinator completion to 03c8babb --- plugins/tmuxinator/_tmuxinator | 55 ++++++++++++++---------------------------- 1 file changed, 18 insertions(+), 37 deletions(-) (limited to 'plugins/tmuxinator') diff --git a/plugins/tmuxinator/_tmuxinator b/plugins/tmuxinator/_tmuxinator index 551267ed2..37032f8d8 100644 --- a/plugins/tmuxinator/_tmuxinator +++ b/plugins/tmuxinator/_tmuxinator @@ -1,40 +1,21 @@ -#compdef tmuxinator mux -#autoload +_tmuxinator() { + local commands projects + commands=(${(f)"$(tmuxinator commands zsh)"}) + projects=(${(f)"$(tmuxinator completions start)"}) -local curcontext="$curcontext" state line ret=1 -local -a _configs - -_arguments -C \ - '1: :->cmds' \ - '2:: :->args' && ret=0 - -_configs=(${$(echo ~/.tmuxinator/*.yml):r:t}) - -case $state in - cmds) - _values "tmuxinator command" \ - "new[create a new project file and open it in your editor]" \ - "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]" \ - "debug[output the shell commands generated by a projet]" \ - "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]" \ - $_configs - ret=0 - ;; - args) - case $line[1] in - start|open|copy|delete|debug) - [[ -n "$_configs" ]] && _values 'configs' $_configs - ret=0 - ;; + if (( CURRENT == 2 )); then + _describe -t commands "tmuxinator subcommands" commands + _describe -t projects "tmuxinator projects" projects + elif (( CURRENT == 3)); then + case $words[2] in + copy|debug|delete|open|start) + _arguments '*:projects:($projects)' + ;; esac - ;; -esac + fi + + return +} -return ret +compdef _tmuxinator tmuxinator mux +alias mux="tmuxinator" -- cgit v1.2.3-70-g09d2 From b67883f9632932dde00c09498eb44ee4f3628288 Mon Sep 17 00:00:00 2001 From: gramps Date: Tue, 2 Oct 2018 14:22:59 -0500 Subject: Create README.md --- plugins/tmuxinator/README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 plugins/tmuxinator/README.md (limited to 'plugins/tmuxinator') diff --git a/plugins/tmuxinator/README.md b/plugins/tmuxinator/README.md new file mode 100644 index 000000000..25631d095 --- /dev/null +++ b/plugins/tmuxinator/README.md @@ -0,0 +1,18 @@ +# Tmuxinator plugin + +This plugin provides 4 aliases for tmuxinator commands. + +To use it add `tmuxinator` to the plugins array in your zshrc file. + +```zsh +plugins=(... tmuxinator) +``` + +## Aliases + +| Alias | Command | Description | +| ------ | ---------------- | ------------------------ | +| `txs ` | tmuxinator start | Start | +| `txo ` | tmuxinator open | Open project for editing | +| `txn ` | tmuxinator new | Create project | +| `txl ` | tmuxinator list | List projects | -- cgit v1.2.3-70-g09d2 From 3ed19ce45ebcc4bcdff57e0c30f2335af9f40869 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Tue, 2 Oct 2018 21:49:06 +0200 Subject: added completion and link --- plugins/tmuxinator/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins/tmuxinator') diff --git a/plugins/tmuxinator/README.md b/plugins/tmuxinator/README.md index 25631d095..994d8d46d 100644 --- a/plugins/tmuxinator/README.md +++ b/plugins/tmuxinator/README.md @@ -1,6 +1,7 @@ # Tmuxinator plugin -This plugin provides 4 aliases for tmuxinator commands. +This plugin provides completion for [tmuxinator](https://github.com/tmuxinator/tmuxinator), +as well as aliases for frequent tmuxinator commands. To use it add `tmuxinator` to the plugins array in your zshrc file. @@ -12,7 +13,7 @@ plugins=(... tmuxinator) | Alias | Command | Description | | ------ | ---------------- | ------------------------ | -| `txs ` | tmuxinator start | Start | +| `txs ` | tmuxinator start | Start Tmuxinator | | `txo ` | tmuxinator open | Open project for editing | | `txn ` | tmuxinator new | Create project | | `txl ` | tmuxinator list | List projects | -- cgit v1.2.3-70-g09d2 From d0efa0071c37b86512a2569aeff89f9faaeb4309 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Tue, 9 Apr 2019 15:37:24 +0200 Subject: tmuxinator: fix completion file header --- plugins/tmuxinator/_tmuxinator | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins/tmuxinator') diff --git a/plugins/tmuxinator/_tmuxinator b/plugins/tmuxinator/_tmuxinator index 37032f8d8..9ae25ac38 100644 --- a/plugins/tmuxinator/_tmuxinator +++ b/plugins/tmuxinator/_tmuxinator @@ -1,3 +1,6 @@ +#compdef tmuxinator mux +#autoload + _tmuxinator() { local commands projects commands=(${(f)"$(tmuxinator commands zsh)"}) @@ -17,5 +20,4 @@ _tmuxinator() { return } -compdef _tmuxinator tmuxinator mux -alias mux="tmuxinator" +compdef _tmuxinator tmuxinator -- cgit v1.2.3-70-g09d2