From bcc988ecae29b90d731ab5df1d39ffde3a30336e Mon Sep 17 00:00:00 2001 From: Ben O'Hara Date: Sat, 7 Jul 2012 13:35:28 +1000 Subject: [PATCH] Add aliases for tmuxinator if installed --- modules/completion/functions | 2 +- modules/syntax-highlighting/external | 2 +- modules/tmux/README.md | 12 ++++++++++++ modules/tmux/init.zsh | 12 ++++++++++++ 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/modules/completion/functions b/modules/completion/functions index 8b89dd9d10..650f504207 160000 --- a/modules/completion/functions +++ b/modules/completion/functions @@ -1 +1 @@ -Subproject commit 8b89dd9d10e86313f49fafdf88e8540f97346f33 +Subproject commit 650f504207eaaab733a89329e4c3cc8c7df75933 diff --git a/modules/syntax-highlighting/external b/modules/syntax-highlighting/external index bb0d575942..732b7d6e65 160000 --- a/modules/syntax-highlighting/external +++ b/modules/syntax-highlighting/external @@ -1 +1 @@ -Subproject commit bb0d575942760fe483790fe878ea43b1f781e2ca +Subproject commit 732b7d6e65c0349ee1d89b698bf9cd8a30c1015d diff --git a/modules/tmux/README.md b/modules/tmux/README.md index cfc3be4117..b8daa9bc56 100644 --- a/modules/tmux/README.md +++ b/modules/tmux/README.md @@ -27,6 +27,17 @@ Aliases - `ta` attaches or switches to a tmux session. - `tl` lists sessions managed by the tmux server. +If [tmuxinator][6] is installed, these aliases will also be setup + + - `ts [project_name]` start a tmux session using project's tmuxinator config + - `to [project_name]` create a new project file and open it in your editor + - `tc [source_project] [new_project]` copy source_project project file to a new project called new_project + - `tD [project_name]` deletes the project called project_name + - `tI` deletes all existing projects! + - `tls` list all existing projects + - `tlsv` verbosly list all existing projects + - `tdoc` look for problems in your configuration + Caveats ------- @@ -53,4 +64,5 @@ Authors [3]: ChrisJohnsen/tmux-MacOSX-pasteboard [4]: mxcl/homebrew [5]: https://github.com/sorin-ionescu/oh-my-zsh/issues +[6]: https://github.com/aziz/tmuxinator diff --git a/modules/tmux/init.zsh b/modules/tmux/init.zsh index 9be0f0da49..379c97d994 100644 --- a/modules/tmux/init.zsh +++ b/modules/tmux/init.zsh @@ -31,3 +31,15 @@ fi # Aliases alias ta="tmux attach-session" alias tl="tmux list-sessions" + +if (( $+commands[tmuxinator] )); then + alias ts="tmuxinator start " + alias to="tmuxinator open " + alias tc="tmuxinator copy " + alias tD="tmuxinator delete " + alias tI="tmuxinator implode" + alias tls="tmuxinator list" + alias tlsv="tmuxinator list -v" + alias tdoc="tmuxinator doctor" +fi +