2 # Pick from the provided input
3 if [ -z "$PICKER" ]; then
4 if command -v fzf >/dev/null; then
6 elif command -v fzy >/dev/null; then
8 elif command -v ask >/dev/null; then
10 elif command -v dmenu >/dev/null; then
12 elif command -v pick >/dev/null; then
19 printf '\033[3A\033[?25h' >/dev/tty
20 fzf --read0 --height=6 --prompt="$(printf "$1")"
23 printf '\033[3A\033[?25h' >/dev/tty
24 tr '\0' '\n' | fzy --lines=5 --prompt="$(printf "\033[1m$1\033[0m")"
27 ask --read0 --prompt="$(printf "$1\033[?25h")"
30 tr '\0' '\n' | dmenu -i -l 10 -p "$(printf "$1")"
33 printf '\033[?25h' >/dev/tty
37 query="$(bbask "$1")" && grep -i -m1 "$(echo "$query" | sed 's;.;[^/&]*[&];g')"