Remove unnecessary reattach-to-user-namespace on macOS

This commit is contained in:
2026-04-10 10:47:20 +01:00
parent fe8cae44f1
commit fdae4c140c

View File

@@ -62,10 +62,6 @@ set -ga terminal-overrides 'xterm*:smxx=\E[9m'
bind a run-shell ~/.local/share/tmux/layouts/window-auto bind a run-shell ~/.local/share/tmux/layouts/window-auto
# TODO: bind A run-shell ~/.local/share/tmux/layouts/window-auto --refresh # TODO: bind A run-shell ~/.local/share/tmux/layouts/window-auto --refresh
# Set only on macOS where it's required
if -b '[ "`uname`" = "Darwin" ]' \
'set -g default-command "reattach-to-user-namespace -l $SHELL"'
if -b '~/.config/tmux/check-version.sh ">=" 3.2 && ~/.config/tmux/check-version.sh "<" 3.3' { if -b '~/.config/tmux/check-version.sh ">=" 3.2 && ~/.config/tmux/check-version.sh "<" 3.3' {
bind A display-popup -d '#{pane_current_path}' -w 50% -h 90% -E ~/.config/tmux/agent.sh bind A display-popup -d '#{pane_current_path}' -w 50% -h 90% -E ~/.config/tmux/agent.sh
bind H display-popup -w 75% -h 75% -E htop bind H display-popup -w 75% -h 75% -E htop
@@ -158,9 +154,8 @@ if -b '[ "$SSH_TTY" != "" ]' \
'set-option -g set-clipboard on' 'set-option -g set-clipboard on'
# Yank to the system clipboard in copy mode. # Yank to the system clipboard in copy mode.
# TODO: reattach-to-user-namespace not necessary with tmux > 2.6
if -b '[ "`uname`" = "Darwin" ]' \ if -b '[ "`uname`" = "Darwin" ]' \
'bind -T copy-mode-vi y send-keys -X copy-pipe "reattach-to-user-namespace pbcopy"' 'bind -T copy-mode-vi y send-keys -X copy-pipe "pbcopy"'
# When not in WSL2 use xsel, when in WSL use win32yank.exe to avoid UI lockups. # When not in WSL2 use xsel, when in WSL use win32yank.exe to avoid UI lockups.
if -b '[ "$WSLENV" = "" ]' \ if -b '[ "$WSLENV" = "" ]' \
'bind -T copy-mode-vi y send-keys -X copy-pipe "xsel -i --clipboard"' \ 'bind -T copy-mode-vi y send-keys -X copy-pipe "xsel -i --clipboard"' \