Skip to content

Commit 909eb52

Browse files
committed
Support retaining ${group} values while not displaying group headers
This commit adds a new `show-group` style value: `quiet`. Specifying this option prevents any group headers from displaying in the completion list, while still providing the ${group} value(s) to FZF preview/shell commands. This is an alternative to `show-group none` where no headers are shown, but all ${group} values are replaced by `__hide__`.
1 parent 01dad75 commit 909eb52

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/-ftb-generate-header

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ typeset -ga _ftb_headers=()
44
local i tmp group_colors
55
local -i mlen=0 len=0
66

7+
# Keep ${group} value for preview, binds, etc without displaying group headers
8+
if { -ftb-zstyle -m show-group "quiet" }; then
9+
return
10+
fi
11+
712
if (( $#_ftb_groups == 1 )) && { ! -ftb-zstyle -m single-group "header" }; then
813
return
914
fi

0 commit comments

Comments
 (0)