ad8220bc6d4529db43c0968175f1b8d0e6637db0
- Author
- ajr-dev <np8r39st8hn854izdxrw.septuagenarians@aleeas.com>
- Committer
- Marc Cornellà <hello@mcornella.com>
- Date
Message
fix(tmux): use `$ZSH_TMUX_CONFIG` setting in tmuxconf alias
Diff
1diff --git a/plugins/tmux/README.md b/plugins/tmux/README.md
2index bc192a40caf3341ed8b34fdcd06e5843dfa19e24..7348f77c942210654589c1b43722ac9083e6a7da 100644
3--- a/plugins/tmux/README.md
4+++ b/plugins/tmux/README.md
5@@ -15,16 +15,16 @@ 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-| `tmuxconf` | `$EDITOR ~/.tmux.conf` | Open .tmux.conf file with an editor |
19+| Alias | Command | Description |
20+| ---------- | -------------------------- | -------------------------------------------------------- |
21+| `ta` | tmux attach -t | Attach new tmux session to already running named session |
22+| `tad` | tmux attach -d -t | Detach named tmux session |
23+| `ts` | tmux new-session -s | Create a new named tmux session |
24+| `tl` | tmux list-sessions | Displays a list of running tmux sessions |
25+| `tksv` | tmux kill-server | Terminate all running tmux sessions |
26+| `tkss` | tmux kill-session -t | Terminate named running tmux session |
27+| `tmux` | `_zsh_tmux_plugin_run` | Start a new tmux session |
28+| `tmuxconf` | `$EDITOR $ZSH_TMUX_CONFIG` | Open .tmux.conf file with an editor |
29
30 ## Configuration Variables
31
32diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh
33index 9d333257e33059baf16250751bc10f1b0725b4dc..b9bb66d59de3195f32a6eb48cc64eaf22a29c810 100644
34--- a/plugins/tmux/tmux.plugin.zsh
35+++ b/plugins/tmux/tmux.plugin.zsh
36@@ -3,16 +3,6 @@ if ! (( $+commands[tmux] )); then
37 return 1
38 fi
39
40-# ALIASES
41-
42-alias ta='tmux attach -t'
43-alias tad='tmux attach -d -t'
44-alias ts='tmux new-session -s'
45-alias tl='tmux list-sessions'
46-alias tksv='tmux kill-server'
47-alias tkss='tmux kill-session -t'
48-alias tmuxconf='$EDITOR ~/.tmux.conf'
49-
50 # CONFIGURATION VARIABLES
51 # Automatically start tmux
52 : ${ZSH_TMUX_AUTOSTART:=false}
53@@ -40,6 +30,16 @@ alias tmuxconf='$EDITOR ~/.tmux.conf'
54 # Set -u option to support unicode
55 : ${ZSH_TMUX_UNICODE:=false}
56
57+# ALIASES
58+
59+alias ta='tmux attach -t'
60+alias tad='tmux attach -d -t'
61+alias ts='tmux new-session -s'
62+alias tl='tmux list-sessions'
63+alias tksv='tmux kill-server'
64+alias tkss='tmux kill-session -t'
65+alias tmuxconf='$EDITOR $ZSH_TMUX_CONFIG'
66+
67 # Determine if the terminal supports 256 colors
68 if [[ $terminfo[colors] == 256 ]]; then
69 export ZSH_TMUX_TERM=$ZSH_TMUX_FIXTERM_WITH_256COLOR