File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,14 @@ create_zbm_conf() {
9999 has_border=1
100100 fi
101101
102+ # Check if fuzzy finder supports --raw flag
103+ # Added in fzf 0.66.0
104+
105+ local has_raw
106+ if echo " abc" | fzf -f " abc" --raw --exit-0 > /dev/null 2>&1 ; then
107+ has_raw=1
108+ fi
109+
102110 local has_column
103111 if command -v column > /dev/null 2>&1 ; then
104112 has_column=1
@@ -132,6 +140,7 @@ create_zbm_conf() {
132140 export HAS_DISABLED="${has_disabled} "
133141 export HAS_BORDER="${has_border} "
134142 export HAS_COLUMN="${has_column} "
143+ export HAS_RAW="${has_raw} "
135144 export ZBM_BUILDSTYLE="${ZBM_BUILDSTYLE} "
136145 export ZBM_RELEASE_BUILD="${zfsbootmenu_release_build} "
137146 EOF
Original file line number Diff line number Diff line change @@ -35,6 +35,15 @@ if [ ${loglevel:-4} -eq 7 ] ; then
3535 )
3636fi
3737
38+ if [ -n " ${HAS_RAW} " ]; then
39+ fuzzy_default_options+=(
40+ " --raw"
41+ " --bind" ' "result:best"'
42+ " --bind" ' "up:up-match"'
43+ " --bind" ' "down:down-match"'
44+ )
45+ fi
46+
3847export FUZZYSEL=fzf
3948export PREVIEW_HEIGHT=2
4049export FZF_DEFAULT_OPTS=" ${fuzzy_default_options[*]} "
You can’t perform that action at this time.
0 commit comments