Closed guywithacube closed 1 year ago
Currently, "automatically configuring" the TERM environment variable in tmux relies on the session-created hook.
TERM
tmux
session-created
Calling set-hook -R session-created when tmux does not have any sessions has different functionality between tmux 3.2a and tmux 3.3a. This may occur when set-hook -R session-created is directly from tmux.conf.
set-hook -R session-created
tmux 3.2a
tmux 3.3a
tmux.conf
Invoking tmux new-session results in:
tmux new-session
server exited unexpectedly
The ending of tmux-server-24242.log is as follows:
tmux-server-24242.log
1673642800.543227 cmd_parse_build_commands: set-hook -R session-created 1673642800.543232 cmd_find_best_session: 0 sessions to try 1673642800.543237 cmdq_next <global>: [set-hook/0x7fca8380e320] (0), flags 0 1673642800.543244 cmdq_fire_command <global>: (1537) set-hook -R session-created 1673642800.543248 cmd_find_best_session: 0 sessions to try 1673642800.543252 cmd_find_current_client: no target, return 0x0 1673642800.543255 cmd_find_best_session: 0 sessions to try 1673642800.543259 cmd_find_current_client: no target, return 0x0 1673642800.543263 cmd_find_best_session: 0 sessions to try 1673642800.543267 cmd_find_target: target none, type pane, item 0x7fca8380e320, flags QUIET,CANFAIL 1673642800.543271 cmd_find_best_session: 0 sessions to try 1673642800.543275 cmd_find_target: error 1673642800.543279 format_defaults: c=none 1673642800.543283 format_defaults: s=none 1673642800.543286 format_defaults: wl=none 1673642800.543290 format_defaults: wp=none 1673642800.543294 format_expand1: expanding format: session-created 1673642800.543298 format_expand1: result is: session-created
Invoking tmux new-session operates as expected. The relevant tmux server log has nothing substantial.
Ideally, these dotfiles should be as portable as possible. So, it would be nice to find a solution that works on any version of tmux.
Currently, "automatically configuring" the
TERM
environment variable intmux
relies on thesession-created
hook.Calling
set-hook -R session-created
whentmux
does not have any sessions has different functionality betweentmux 3.2a
andtmux 3.3a
. This may occur whenset-hook -R session-created
is directly fromtmux.conf
.tmux 3.2a
Invoking
tmux new-session
results in:The ending of
tmux-server-24242.log
is as follows:tmux 3.3a
Invoking
tmux new-session
operates as expected. The relevanttmux
server log has nothing substantial.Ideally, these dotfiles should be as portable as possible. So, it would be nice to find a solution that works on any version of
tmux
.