m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-17 07:43:39 -05:00

Add --border-label and --border-label-pos

Close #3022
This commit is contained in:
Junegunn Choi
2022-10-30 00:12:01 +09:00
parent 0de1aacb0c
commit e61585f2f3
5 changed files with 233 additions and 86 deletions

View File

@@ -226,6 +226,45 @@ Draw border around the finder
.BR none
.br
.TP
.BI "--border-label" [=LABEL]
Label to print on the horizontal border line. Should be used with one of the
following \fB--border\fR options.
.br
.B * rounded
.br
.B * sharp
.br
.B * horizontal
.br
.BR "* top" " (up)"
.br
.BR "* bottom" " (down)"
.br
.br
e.g.
\fB# ANSI color codes are supported
# (with https://github.com/busyloop/lolcat)
label=$(curl -s http://metaphorpsum.com/sentences/1 | lolcat -f)
# Border label at the center
fzf --height=10 --border-label="╢ $label ╟" --border --color=label:italic:black
# Left-aligned (positive integer)
fzf --height=10 --border-label="╢ $label ╟" --border=top --border-label-pos=3 --color=label:italic:black
# Right-aligned (negative integer)
fzf --height=10 --border-label="╢ $label ╟" --border=bottom --border-label-pos=-3 --color=label:italic:black\fR
.TP
.BI "--border-label-pos" [=COL]
Horizontal position of the border label on the border line. Specify a positive
integer as the column position from the left. Specify a negative integer to
right-align the label. The default value 0 (or \fBcenter\fR) will put
the label at the center of the border line.
.TP
.B "--no-unicode"
Use ASCII characters instead of Unicode box drawing characters to draw border
@@ -356,6 +395,7 @@ color mappings.
\fBdisabled \fRQuery string when search is disabled
\fBinfo \fRInfo line (match counters)
\fBborder \fRBorder around the window (\fB--border\fR and \fB--preview\fR)
\fBlabel \fRBorder label (\fB--border-label\fR)
\fBprompt \fRPrompt
\fBpointer \fRPointer to the current line
\fBmarker \fRMulti-select marker