mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-21 20:35:11 +00:00
parent
48adad5454
commit
5b7457ff08
16
install
16
install
@ -59,14 +59,14 @@ cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
fzf_base="$(pwd)"
|
||||
|
||||
ask() {
|
||||
# If stdin is a tty, we are "interactive".
|
||||
# non-interactive shell: wait for a linefeed
|
||||
# interactive shell: continue after a single keypress
|
||||
read_n=$([ -t 0 ] && echo "-n 1")
|
||||
|
||||
read -p "$1 ([y]/n) " $read_n -r
|
||||
echo
|
||||
[[ $REPLY =~ ^[Nn]$ ]]
|
||||
while true; do
|
||||
read -p "$1 ([y]/n) " -r
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
return 1
|
||||
elif [[ $REPLY =~ ^[Nn]$ ]]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
check_binary() {
|
||||
|
Loading…
Reference in New Issue
Block a user