aboutsummaryrefslogtreecommitdiff
path: root/tmux.1
diff options
context:
space:
mode:
authornicm <nicm>2020-03-31 17:14:40 +0000
committernicm <nicm>2020-03-31 17:14:40 +0000
commitcc8b41f294974cdfb1ddfe3b907da58374ff130f (patch)
tree32855ba0999368039d3d7d40ecbbec3c096c50f9 /tmux.1
parente6cddcf752b335cb945bba4619b500b527cfee0a (diff)
downloadrtmux-cc8b41f294974cdfb1ddfe3b907da58374ff130f.tar.gz
rtmux-cc8b41f294974cdfb1ddfe3b907da58374ff130f.tar.bz2
rtmux-cc8b41f294974cdfb1ddfe3b907da58374ff130f.zip
Add a way to mark environment variables as "hidden" so they can be used
by tmux but are not passed into the environment of new panes.
Diffstat (limited to 'tmux.1')
-rw-r--r--tmux.126
1 files changed, 24 insertions, 2 deletions
diff --git a/tmux.1 b/tmux.1
index b0fc5600..e785cf8b 100644
--- a/tmux.1
+++ b/tmux.1
@@ -565,6 +565,18 @@ Environment variables may be set by using the syntax
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 ,
@@ -4711,10 +4723,16 @@ from inside, and the
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 @@ flag unsets a variable.
.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 @@ Variables removed from the environment are prefixed with
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