mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
Use default-shell for command prompt #() and popups as well
This commit is contained in:
18
tmux.c
18
tmux.c
@ -239,6 +239,24 @@ fail:
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
char *
|
||||
shell_argv0(const char *shell, int is_login)
|
||||
{
|
||||
const char *slash, *name;
|
||||
char *argv0;
|
||||
|
||||
slash = strrchr(shell, '/');
|
||||
if (slash != NULL && slash[1] != '\0')
|
||||
name = slash + 1;
|
||||
else
|
||||
name = shell;
|
||||
if (is_login)
|
||||
xasprintf(&argv0, "-%s", name);
|
||||
else
|
||||
xasprintf(&argv0, "%s", name);
|
||||
return (argv0);
|
||||
}
|
||||
|
||||
void
|
||||
setblocking(int fd, int state)
|
||||
{
|
||||
|
Reference in New Issue
Block a user