0f45f82c0afdcaf71b193e349d01c069a3fb9de7

Author
Daniel R. Neal <dan.r.neal@gmail.com>
Committer
GitHub <noreply@github.com>
Date

Message

feat(tmux): add 'to' alias for session attachment (#13479)

Diff

 1diff --git a/plugins/tmux/README.md b/plugins/tmux/README.md
 2index 39c57f84679ce88ea1b5019e8c52c10c6235d10d..aaa81aa1780c1b5833a7e11ebfd77835346ee4ac 100644
 3--- a/plugins/tmux/README.md
 4+++ b/plugins/tmux/README.md
 5@@ -23,6 +23,7 @@ The plugin also supports the following:
 6 | `tkss`     | tmux kill-session -t       | Terminate named running tmux session                     |
 7 | `tksv`     | tmux kill-server           | Terminate all running tmux sessions                      |
 8 | `tl`       | tmux list-sessions         | Displays a list of running tmux sessions                 |
 9+| `to`       | tmux new-session -A -s     | Create or attach to a named tmux session                 |
10 | `tmux`     | `_zsh_tmux_plugin_run`     | Start a new tmux session                                 |
11 | `tmuxconf` | `$EDITOR $ZSH_TMUX_CONFIG` | Open .tmux.conf file with an editor                      |
12 | `ts`       | tmux new-session -s        | Create a new named tmux session                          |
13diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh
14index 4c184c2d0dbdcbe4b934c596b3aa9b9e6223fe89..b1d97e98f7b0551420fc3bbc84c2cba7e6a8976d 100644
15--- a/plugins/tmux/tmux.plugin.zsh
16+++ b/plugins/tmux/tmux.plugin.zsh
17@@ -81,6 +81,7 @@ alias tmuxconf='$EDITOR $ZSH_TMUX_CONFIG'
18 
19 _build_tmux_alias "ta" "attach" "-t"
20 _build_tmux_alias "tad" "attach -d" "-t"
21+_build_tmux_alias "to" "new-session -A" "-s"
22 _build_tmux_alias "ts" "new-session" "-s"
23 _build_tmux_alias "tkss" "kill-session" "-t"
24