mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
When using tmux as a login shell, there is currently no way to specify a shell
to be used as a login shell inside tmux, so add a default-shell session option. This sets the shell invoked as a login shell when the default-command option is empty. The default option value is whichever of $SHELL, getpwuid(getuid())'s pw_shell or /bin/sh is valid first. Based on a diff from martynas@, changed by me to be a session option rather than a window option.
This commit is contained in:
2
names.c
2
names.c
@ -90,7 +90,7 @@ default_window_name(struct window *w)
|
||||
return (xstrdup("[tmux]"));
|
||||
if (w->active->cmd != NULL && *w->active->cmd != '\0')
|
||||
return (parse_window_name(w->active->cmd));
|
||||
return (parse_window_name(window_default_command()));
|
||||
return (parse_window_name(w->active->shell));
|
||||
}
|
||||
|
||||
char *
|
||||
|
Reference in New Issue
Block a user