mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
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.
This commit is contained in:
@ -38,8 +38,8 @@ const struct cmd_entry cmd_show_environment_entry = {
|
||||
.name = "show-environment",
|
||||
.alias = "showenv",
|
||||
|
||||
.args = { "gst:", 0, 1 },
|
||||
.usage = "[-gs] " CMD_TARGET_SESSION_USAGE " [name]",
|
||||
.args = { "hgst:", 0, 1 },
|
||||
.usage = "[-hgs] " CMD_TARGET_SESSION_USAGE " [name]",
|
||||
|
||||
.target = { 't', CMD_FIND_SESSION, CMD_FIND_CANFAIL },
|
||||
|
||||
@ -69,7 +69,13 @@ static void
|
||||
cmd_show_environment_print(struct cmd *self, struct cmdq_item *item,
|
||||
struct environ_entry *envent)
|
||||
{
|
||||
char *escaped;
|
||||
struct args *args = self->args;
|
||||
char *escaped;
|
||||
|
||||
if (!args_has(args, 'h') && (envent->flags & ENVIRON_HIDDEN))
|
||||
return;
|
||||
if (args_has(args, 'h') && (~envent->flags & ENVIRON_HIDDEN))
|
||||
return;
|
||||
|
||||
if (!args_has(self->args, 's')) {
|
||||
if (envent->value != NULL)
|
||||
|
Reference in New Issue
Block a user