summaryrefslogtreecommitdiff
path: root/etc/functions/confirm_yes
blob: 7389d1dceeb9cea8362724b666346cce6a2aaad6 (plain)
1
2
3
4
5
6
7
8
9
## vim:ft=zsh
echo -n "$* [Y/n] "
read -k 1
[[ $REPLY != $'\n' ]] && echo
if [[ $REPLY == 'y' || $REPLY == 'Y' || $REPLY == $'\n' ]] {
	true
} else {
	false
}