Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tmux/tmux.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
if-shell '[ -n "#{env:TMUX_SHELL}" ]' 'set-option -g default-shell "#{env:TMUX_SHELL}"'
if-shell '[ -n "${TMUX_SHELL}" ]' 'set-option -g default-shell "${TMUX_SHELL}"'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use tmux format expansion for default-shell

In tmux command arguments, ${TMUX_SHELL} is not expanded because tmux only expands its own format strings (e.g., #{env:TMUX_SHELL}) inside set-option. The if-shell condition runs in /bin/sh so the test works, but the set-option argument becomes the literal string ${TMUX_SHELL} and tmux will try to use that literal as the shell path. This breaks users who set TMUX_SHELL, because tmux won’t pick up their intended shell value.

Useful? React with 👍 / 👎.

# set-option -g default-shell "${TMUX_SHELL}"
set-option -g default-terminal screen-256color
set-option -ga terminal-overrides ",xterm-256color:Tc"

Expand Down