=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tmux.1,v retrieving revision 1.727 retrieving revision 1.728 diff -u -r1.727 -r1.728 --- src/usr.bin/tmux/tmux.1 2020/03/31 17:13:20 1.727 +++ src/usr.bin/tmux/tmux.1 2020/03/31 17:14:40 1.728 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tmux.1,v 1.727 2020/03/31 17:13:20 nicm Exp $ +.\" $OpenBSD: tmux.1,v 1.728 2020/03/31 17:14:40 nicm Exp $ .\" .\" Copyright (c) 2007 Nicholas Marriott .\" @@ -565,7 +565,19 @@ for example .Ql HOME=/home/user . Variables set during parsing are added to the global environment. +A hidden variable may be set with +.Ql %hidden , +for example: +.Bd -literal -offset indent +%hidden MYVAR=42 +.Ed .Pp +Hidden variables are not passed to the environment of processes created +by tmux. +See the +.Sx GLOBAL AND SESSION ENVIRONMENT +section. +.Pp Commands may be parsed conditionally by surrounding them with .Ql %if , .Ql %elif , @@ -4711,10 +4723,16 @@ variable with the correct terminal setting of .Ql screen . .Pp +Variables in both session and global environments may be marked as hidden. +Hidden variables are not passed into the environment of new processes and +instead can only be used by tmux itself (for example in formats, see the +.Sx FORMATS +section). +.Pp Commands to alter and view the environment are: .Bl -tag -width Ds .It Xo Ic set-environment -.Op Fl gru +.Op Fl hgru .Op Fl t Ar target-session .Ar name Op Ar value .Xc @@ -4731,8 +4749,10 @@ .Fl r indicates the variable is to be removed from the environment before starting a new process. +.Fl h +marks the variable as hidden. .It Xo Ic show-environment -.Op Fl gs +.Op Fl hgs .Op Fl t Ar target-session .Op Ar variable .Xc @@ -4749,6 +4769,8 @@ If .Fl s is used, the output is formatted as a set of Bourne shell commands. +.Fl h +shows hidden variables (omitted by default). .El .Sh STATUS LINE .Nm