mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 13:37:12 +00:00
Use default-shell for command prompt #() and popups as well
This commit is contained in:
14
client.c
14
client.c
@ -490,20 +490,10 @@ client_send_identify(const char *ttynam, const char *termname, char **caps,
|
||||
static __dead void
|
||||
client_exec(const char *shell, const char *shellcmd)
|
||||
{
|
||||
const char *name, *ptr;
|
||||
char *argv0;
|
||||
char *argv0;
|
||||
|
||||
log_debug("shell %s, command %s", shell, shellcmd);
|
||||
|
||||
ptr = strrchr(shell, '/');
|
||||
if (ptr != NULL && *(ptr + 1) != '\0')
|
||||
name = ptr + 1;
|
||||
else
|
||||
name = shell;
|
||||
if (client_flags & CLIENT_LOGIN)
|
||||
xasprintf(&argv0, "-%s", name);
|
||||
else
|
||||
xasprintf(&argv0, "%s", name);
|
||||
argv0 = shell_argv0(shell, !!(client_flags & CLIENT_LOGIN));
|
||||
setenv("SHELL", shell, 1);
|
||||
|
||||
proc_clear_signals(client_proc, 1);
|
||||
|
Reference in New Issue
Block a user