Open cixel opened 3 weeks ago
I'm also experiencing the same issue. The notes for tmux 3.5a here https://github.com/tmux/tmux/issues/4162 say the following:
"Note that a fix in 3.5 and 3.5a to correctly set SHELL for run-shell and if-shell reveals a bug in the tmux-sensible script, causing it to set default-shell to /bin/sh. This can be worked around by adding this to .tmux.conf after the tmux-sensible script is invoked:"
- system: `"aarch64-darwin"`
- host os: `Darwin 24.0.0, macOS 15.0.1`
- multi-user?: `yes`
- sandbox: `no`
- version: `nix-env (Nix) 2.18.8`
- channels(root): `"nixpkgs"`
- nixpkgs: `/nix/store/60sn02zhawl3kwn0r515zff3h6hg6ydz-source`
EDIT: Using the following in extraConfig
to make sure it's run after tmux-sensible
loads seems to fix the issue on darwin and is the updated recommendation from https://github.com/tmux/tmux/issues/4162#issuecomment-2412201969
set -gu default-command
set -g default-shell "$SHELL"
Same here. Having set -g default-shell "$SHELL"
as the last line in my tmux.conf
does not fix the issue, only disabling the sensible plugin by setting sensibleOnTop
to false
does.
EDIT: using set -g default-command "$SHELL"
does fix the issue on darwin (with the sensible plugin enabled)
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/tmux-use-bash-instead-defined-zsh-in-home-manager/54763/2
Quick and (very) dirty workaround for this:
nixpkgs.overlays = [
(final: prev: {
tmuxPlugins = prev.tmuxPlugins // {
sensible = prev.tmuxPlugins.sensible.overrideAttrs (prev: {
postInstall = prev.postInstall + ''
sed -e 's:\$SHELL:/bin/zsh:g' -i $target/sensible.tmux
'';
});
};
})
];
It hardcodes /bin/zsh
(replace it with what you like to use) and rebuilds tmux-sensible with it.
Are you following the right branch?
Is there an existing issue for this?
Issue description
The upstream version of
tmux
was updated last week to 3.5a (commit). One of the changes in this version (from 3.5) is that/bin/sh
is used for run-shell.With this version of tmux, all panes/windows/etc use
sh
instead of the configured default shell (in my case,zsh
).My rough guess is that this change in tmux has introduced some ordering issues when
sensibleOnTop
is set, asrun-shell
will now usesh
regardless of how tmux's default-shell is set.The problem goes away if I do:
or if I set
sensibleOnTop = false;
Maintainer CC
@jorsn @rycee (cc based on https://github.com/nix-community/home-manager/commit/a7cdfaa32585fce404cf8890bae099348e53e0ad).
System information