Tweak build-dir fzf invocation

This commit is contained in:
Kenneth Benzie 2024-05-01 21:29:00 +01:00
parent 1bdaa8ac08
commit b4ce10f1bd

View File

@ -90,10 +90,10 @@ 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} + 5 ))
local best=$(( ${#local_build_dirs} + 3 ))
local_build_dir=$(
printf '%s\n' "${local_build_dir[@]}" $local_build_dirs |
fzf --layout=reverse --info=hidden --border=rounded \
printf '%s\n' "${local_build_dirs[@]}" |
fzf --layout=reverse --info=hidden --border=rounded --tac \
--height=$(( $best < $max ? $best : $max ))
)
if [[ $? -ne 0 ]]; then