More tweaks for build-dir fzf invocation

This commit is contained in:
Kenneth Benzie 2024-05-03 15:59:54 +01:00
parent 6388b076bd
commit c20d18e62d

View File

@ -90,11 +90,11 @@ EOF
if command -v fzf &> /dev/null; then
# Use fzf to select a build directory
local max=$(( $( tput lines ) / 2 ))
local best=$(( ${#local_build_dirs} + 3 ))
local best=$(( ${#local_build_dirs} + 4 ))
local_build_dir=$(
printf '%s\n' "${local_build_dirs[@]}" |
fzf --layout=reverse --tac --info=hidden --border=rounded \
--height=$(( $best < $max ? $best : $max ))
--cycle --height=$(( $best < $max ? $best : $max ))
)
if [[ $? -ne 0 ]]; then
return 1