Add --{header,header-lines,footer}-border=inline

New BorderShape that embeds the section inside the --list-border
frame, joined to the list content by a horizontal separator with
T-junctions where the list shape has side borders. Requires a list
border with both top and bottom segments; falls back to 'line'
otherwise. Stacks when multiple sections are inline.

Sections inherit --color list-border by default and are colored as a
uniform block via their own --color *-border and *-bg.

Incompatible with --header-first. --header-border=inline requires
--header-lines-border to be inline or unset.
This commit is contained in:
Junegunn Choi
2026-04-20 00:47:16 +09:00
parent ef6eba1b89
commit d754cfab87
9 changed files with 906 additions and 242 deletions
+15 -2
View File
@@ -1100,7 +1100,13 @@ Print header before the prompt line. When both normal header and header lines
.TP
.BI "\-\-header\-border" [=STYLE]
Draw border around the header section. \fBline\fR style draws a single
separator line between the header window and the list section.
separator line between the header window and the list section. \fBinline\fR
style embeds the header inside the list border frame, joined to the list
section by a horizontal separator with T-junctions; it requires a
line-drawing \fB\-\-list\-border\fR (rounded / sharp / bold / double /
horizontal) and falls back to \fBline\fR otherwise. Not compatible with
\fB\-\-header\-first\fR, and when \fB\-\-header\-lines\fR is also set
\fB\-\-header\-lines\-border\fR must also be \fBinline\fR.
.TP
.BI "\-\-header\-label" [=LABEL]
@@ -1116,6 +1122,10 @@ Display header from \fB--header\-lines\fR with a separate border. Pass
\fBnone\fR to still separate the header lines but without a border. To combine
two headers, use \fB\-\-no\-header\-lines\-border\fR. \fBline\fR style draws
a single separator line between the header lines and the list section.
\fBinline\fR style embeds the header lines inside the list border frame
with a T-junction separator; it requires a line-drawing
\fB\-\-list\-border\fR, falls back to \fBline\fR otherwise, and is not
compatible with \fB\-\-header\-first\fR.
.SS FOOTER
@@ -1129,7 +1139,10 @@ are not affected by \fB\-\-with\-nth\fR. ANSI color codes are processed even whe
.TP
.BI "\-\-footer\-border" [=STYLE]
Draw border around the footer section. \fBline\fR style draws a single
separator line between the footer and the list section.
separator line between the footer and the list section. \fBinline\fR style
embeds the footer inside the list border frame with a T-junction separator;
it requires a line-drawing \fB\-\-list\-border\fR and falls back to
\fBline\fR otherwise.
.TP
.BI "\-\-footer\-label" [=LABEL]