-
I have the following script: #! /usr/bin/env bash
my_function_1() { printf "Function 1\n"; }
my_function_2() { printf "Function 2\n"; }
fzf_menu() {
local CHOICE="$(fzf --multi < <(
printf "Function 1\n"
printf "Function 2\n"
printf "Exit\n"
))"
case "$CHOICE" in
"Function 1") my_function_1 ;;
"Function 2") my_function_2 ;;
"Exit" | *)
clear
exit 0
;;
esac
}
while true; do
clear
fzf_menu "$@"
printf "\n\n\t\t\tPress any key to continue"
read -r -n 1
done If I select only one entry (either However, if I select both entries with TAB key and press Enter, the script ends with exit code I would like both Thanks. |
Beta Was this translation helpful? Give feedback.
Answered by
xfzv
Feb 3, 2023
Replies: 1 comment 2 replies
Answer selected by
xfzv
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Anyone?