Use default-shell for command prompt #() and popups as well

This commit is contained in:
nicm
2024-05-15 09:59:12 +00:00
parent bfd65398a9
commit d39dcea30a
4 changed files with 43 additions and 21 deletions

18
tmux.c
View File

@ -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)
{