Add non-regex search variants to avoid the performance cost for people

with large histories or long lines.
This commit is contained in:
nicm 2020-03-31 16:53:23 +00:00
parent cc8b41f294
commit e6d1b6770c
2 changed files with 6 additions and 34 deletions

31
tmux.1
View File

@ -565,18 +565,6 @@ Environment variables may be set by using the syntax
for example for example
.Ql HOME=/home/user . .Ql HOME=/home/user .
Variables set during parsing are added to the global environment. 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 .Pp
Commands may be parsed conditionally by surrounding them with Commands may be parsed conditionally by surrounding them with
.Ql %if , .Ql %if ,
@ -2273,7 +2261,7 @@ Rename the current window, or the window at
if specified, to if specified, to
.Ar new-name . .Ar new-name .
.It Xo Ic resize-pane .It Xo Ic resize-pane
.Op Fl DLMRTUZ .Op Fl DLMRUZ
.Op Fl t Ar target-pane .Op Fl t Ar target-pane
.Op Fl x Ar width .Op Fl x Ar width
.Op Fl y Ar height .Op Fl y Ar height
@ -2312,9 +2300,6 @@ and unzoomed (its normal position in the layout).
.Fl M .Fl M
begins mouse resizing (only valid if bound to a mouse key binding, see begins mouse resizing (only valid if bound to a mouse key binding, see
.Sx MOUSE SUPPORT ) . .Sx MOUSE SUPPORT ) .
.Pp T
trims all lines below the current cursor position and moves lines out of the
history to replace them.
.It Xo Ic resize-window .It Xo Ic resize-window
.Op Fl aADLRU .Op Fl aADLRU
.Op Fl t Ar target-window .Op Fl t Ar target-window
@ -4723,16 +4708,10 @@ from inside, and the
variable with the correct terminal setting of variable with the correct terminal setting of
.Ql screen . .Ql screen .
.Pp .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: Commands to alter and view the environment are:
.Bl -tag -width Ds .Bl -tag -width Ds
.It Xo Ic set-environment .It Xo Ic set-environment
.Op Fl hgru .Op Fl gru
.Op Fl t Ar target-session .Op Fl t Ar target-session
.Ar name Op Ar value .Ar name Op Ar value
.Xc .Xc
@ -4749,10 +4728,8 @@ flag unsets a variable.
.Fl r .Fl r
indicates the variable is to be removed from the environment before starting a indicates the variable is to be removed from the environment before starting a
new process. new process.
.Fl h
marks the variable as hidden.
.It Xo Ic show-environment .It Xo Ic show-environment
.Op Fl hgs .Op Fl gs
.Op Fl t Ar target-session .Op Fl t Ar target-session
.Op Ar variable .Op Ar variable
.Xc .Xc
@ -4769,8 +4746,6 @@ Variables removed from the environment are prefixed with
If If
.Fl s .Fl s
is used, the output is formatted as a set of Bourne shell commands. is used, the output is formatted as a set of Bourne shell commands.
.Fl h
shows hidden variables (omitted by default).
.El .El
.Sh STATUS LINE .Sh STATUS LINE
.Nm .Nm

9
tmux.h
View File

@ -1048,9 +1048,6 @@ struct environ_entry {
char *name; char *name;
char *value; char *value;
int flags;
#define ENVIRON_HIDDEN 0x1
RB_ENTRY(environ_entry) entry; RB_ENTRY(environ_entry) entry;
}; };
@ -1960,10 +1957,10 @@ struct environ_entry *environ_first(struct environ *);
struct environ_entry *environ_next(struct environ_entry *); struct environ_entry *environ_next(struct environ_entry *);
void environ_copy(struct environ *, struct environ *); void environ_copy(struct environ *, struct environ *);
struct environ_entry *environ_find(struct environ *, const char *); struct environ_entry *environ_find(struct environ *, const char *);
void printflike(4, 5) environ_set(struct environ *, const char *, int, void printflike(3, 4) environ_set(struct environ *, const char *, const char *,
const char *, ...); ...);
void environ_clear(struct environ *, const char *); void environ_clear(struct environ *, const char *);
void environ_put(struct environ *, const char *, int); void environ_put(struct environ *, const char *);
void environ_unset(struct environ *, const char *); void environ_unset(struct environ *, const char *);
void environ_update(struct options *, struct environ *, struct environ *); void environ_update(struct options *, struct environ *, struct environ *);
void environ_push(struct environ *); void environ_push(struct environ *);