675a2d9922ffc1f2cf88dd3d871f22136b7e525c

Author
Billy Mathews <billy@billym.co.uk>
Committer
Marc Cornellà <hello@mcornella.com>
Date

Message

feat(tmux): add `tmuxconf` alias to edit .tmux.conf (#6555)

Closes #6555

Diff

 1diff --git a/plugins/tmux/README.md b/plugins/tmux/README.md
 2index 551814a39b442fdc5a3107230eea23fcf4a9d518..bc192a40caf3341ed8b34fdcd06e5843dfa19e24 100644
 3--- a/plugins/tmux/README.md
 4+++ b/plugins/tmux/README.md
 5@@ -15,20 +15,21 @@ The plugin also supports the following:
 6 
 7 ## Aliases
 8 
 9-| Alias  | Command                | Description                                               |
10-| ------ | -----------------------|---------------------------------------------------------- |
11-| `ta`   | tmux attach -t         | Attach new tmux session to already running named session  |
12-| `tad`  | tmux attach -d -t      | Detach named tmux session                                 |
13-| `ts`   | tmux new-session -s    | Create a new named tmux session                           |
14-| `tl`   | tmux list-sessions     | Displays a list of running tmux sessions                  |
15-| `tksv` | tmux kill-server       | Terminate all running tmux sessions                       |
16-| `tkss` | tmux kill-session -t   | Terminate named running tmux session                      |
17-| `tmux` | `_zsh_tmux_plugin_run` | Start a new tmux session                                  |
18+| Alias      | Command                | Description                                              |
19+| ---------- | ---------------------- | -------------------------------------------------------- |
20+| `ta`       | tmux attach -t         | Attach new tmux session to already running named session |
21+| `tad`      | tmux attach -d -t      | Detach named tmux session                                |
22+| `ts`       | tmux new-session -s    | Create a new named tmux session                          |
23+| `tl`       | tmux list-sessions     | Displays a list of running tmux sessions                 |
24+| `tksv`     | tmux kill-server       | Terminate all running tmux sessions                      |
25+| `tkss`     | tmux kill-session -t   | Terminate named running tmux session                     |
26+| `tmux`     | `_zsh_tmux_plugin_run` | Start a new tmux session                                 |
27+| `tmuxconf` | `$EDITOR ~/.tmux.conf` | Open .tmux.conf file with an editor                      |
28 
29 ## Configuration Variables
30 
31 | Variable                            | Description                                                                   |
32-|-------------------------------------|-------------------------------------------------------------------------------|
33+| ----------------------------------- | ----------------------------------------------------------------------------- |
34 | `ZSH_TMUX_AUTOSTART`                | Automatically starts tmux (default: `false`)                                  |
35 | `ZSH_TMUX_AUTOSTART_ONCE`           | Autostart only if tmux hasn't been started previously (default: `true`)       |
36 | `ZSH_TMUX_AUTOCONNECT`              | Automatically connect to a previous session if it exits (default: `true`)     |
37diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh
38index 5474c35223af52b9b7c0d6dee5bb3e199bf2b73e..9d333257e33059baf16250751bc10f1b0725b4dc 100644
39--- a/plugins/tmux/tmux.plugin.zsh
40+++ b/plugins/tmux/tmux.plugin.zsh
41@@ -11,6 +11,7 @@ alias ts='tmux new-session -s'
42 alias tl='tmux list-sessions'
43 alias tksv='tmux kill-server'
44 alias tkss='tmux kill-session -t'
45+alias tmuxconf='$EDITOR ~/.tmux.conf'
46 
47 # CONFIGURATION VARIABLES
48 # Automatically start tmux