diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2024-05-15 09:59:13 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2024-05-15 09:59:13 +0000 |
commit | 263815373d139cd2b02804faad11aa2c4e21b0b4 (patch) | |
tree | 009a97f98cd20ffac75aba024f0760c57cc3e4e5 /usr.bin/tmux/client.c | |
parent | 83445d02cf0722a8e0505a59fa60228f2de07ccb (diff) |
Use default-shell for command prompt #() and popups as well
Diffstat (limited to 'usr.bin/tmux/client.c')
-rw-r--r-- | usr.bin/tmux/client.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/usr.bin/tmux/client.c b/usr.bin/tmux/client.c index f8195090cbc..dfbf36939be 100644 --- a/usr.bin/tmux/client.c +++ b/usr.bin/tmux/client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.161 2023/07/10 12:00:08 nicm Exp $ */ +/* $OpenBSD: client.c,v 1.162 2024/05/15 09:59:12 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -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); |