style: shorter ask_yn condition

This commit is contained in:
ange 2025-06-21 06:25:19 +00:00
parent 0173cc75f9
commit fd88530dc4
Signed by: ange
GPG Key ID: 9E0C4157BB7BEB1D

2
lib.sh
View File

@ -11,7 +11,7 @@ ask_yn() {
local a
read -rp "$* (Y/n) " a
[ -z "$a" ] || [[ "${a,,}" == y* ]]
[[ "${a,}" =~ ^$|^y ]]
}
declare -A ISO