Add different command historys for different types of prompts

("command", "search" etc). From Anindya Mukherjee.
This commit is contained in:
nicm
2021-06-10 07:50:03 +00:00
parent 6c659494f5
commit 866117636e
13 changed files with 356 additions and 96 deletions

47
tmux.1
View File

@ -3453,7 +3453,9 @@ will write command prompt history on exit and load it from on start.
.It Ic message-limit Ar number
Set the number of error or information messages to save in the message log for
each client.
The default is 100.
.It Ic prompt-history-limit Ar number
Set the number of history items to save in the history file for each type of
command prompt.
.It Xo Ic set-clipboard
.Op Ic on | external | off
.Xc
@ -5376,11 +5378,25 @@ session option.
.Pp
Commands related to the status line are as follows:
.Bl -tag -width Ds
.It Xo Ic clear-prompt-history
.Op Fl T Ar prompt-type
.Xc
.D1 (alias: Ic clrphist)
Clear status prompt history for prompt type
.Ar prompt-type .
If
.Fl T
is omitted, then clear history for all types.
See
.Ic command-prompt
for possible values for
.Ar prompt-type .
.It Xo Ic command-prompt
.Op Fl 1ikNTW
.Op Fl 1ikN
.Op Fl I Ar inputs
.Op Fl p Ar prompts
.Op Fl t Ar target-client
.Op Fl T Ar prompt-type
.Op Ar template
.Xc
Open the command prompt in a client.
@ -5436,14 +5452,20 @@ makes the prompt only accept numeric key presses.
.Fl i
executes the command every time the prompt input changes instead of when the
user exits the command prompt.
.Pp
.Fl T
tells
.Nm
that the prompt is for a target which affects what completions are offered when
the prompt type.
This affects what completions are offered when
.Em Tab
is pressed;
.Fl W
is similar but indicates the prompt is for a window.
is pressed.
Available types are:
.Ql command ,
.Ql search ,
.Ql target
and
.Ql window-target .
.Pp
The following keys have a special meaning in the command prompt, depending
on the value of the
@ -5665,6 +5687,19 @@ If omitted, half of the terminal size is used.
The
.Fl C
flag closes any popup on the client.
.It Xo Ic show-prompt-history
.Op Fl T Ar prompt-type
.Xc
.D1 (alias: Ic showphist)
Display status prompt history for prompt type
.Ar prompt-type .
If
.Fl T
is omitted, then show history for all types.
See
.Ic command-prompt
for possible values for
.Ar prompt-type .
.El
.Sh BUFFERS
.Nm