From: nicm Date: Tue, 1 Feb 2022 12:05:42 +0000 (+0000) Subject: Mention that if-shell and #() use /bin/sh. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=27ce41bf66a7c187ca0a3a73012d63321cb38828;p=openbsd Mention that if-shell and #() use /bin/sh. --- diff --git a/usr.bin/tmux/job.c b/usr.bin/tmux/job.c index c5c2459a5a6..f13cb8d67fe 100644 --- a/usr.bin/tmux/job.c +++ b/usr.bin/tmux/job.c @@ -1,4 +1,4 @@ -/* $OpenBSD: job.c,v 1.66 2021/10/24 21:24:17 deraadt Exp $ */ +/* $OpenBSD: job.c,v 1.67 2022/02/01 12:05:42 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -89,9 +89,8 @@ job_run(const char *cmd, int argc, char **argv, struct environ *e, struct sessio * if-shell to decide on default-terminal based on outside TERM. */ env = environ_for_session(s, !cfg_finished); - if (e != NULL) { + if (e != NULL) environ_copy(e, env); - } sigfillset(&set); sigprocmask(SIG_BLOCK, &set, &oldset); diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1 index fb0df69730e..5544294ca7d 100644 --- a/usr.bin/tmux/tmux.1 +++ b/usr.bin/tmux/tmux.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tmux.1,v 1.873 2021/12/10 12:51:11 nicm Exp $ +.\" $OpenBSD: tmux.1,v 1.874 2022/02/01 12:05:42 nicm Exp $ .\" .\" Copyright (c) 2007 Nicholas Marriott .\" @@ -14,7 +14,7 @@ .\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: December 10 2021 $ +.Dd $Mdocdate: February 1 2022 $ .Dt TMUX 1 .Os .Sh NAME @@ -4989,7 +4989,9 @@ commands to finish; instead, the previous result from running the same command i or a placeholder if the command has not been run before. If the command hasn't exited, the most recent line of output will be used, but the status line will not be updated more than once a second. -Commands are executed with the +Commands are executed using +.Pa /bin/sh +and with the .Nm global environment set (see the .Sx GLOBAL AND SESSION ENVIRONMENT @@ -6155,6 +6157,8 @@ Execute the first .Ar command if .Ar shell-command +(run with +.Pa /bin/sh ) returns success or the second .Ar command otherwise. @@ -6191,6 +6195,8 @@ option. .D1 Pq alias: Ic run Execute .Ar shell-command +using +.Pa /bin/sh or (with .Fl C ) a