yes and no clarity
This commit is contained in:
parent
c952028d88
commit
29d6ad1c01
10
mw
10
mw
@ -220,8 +220,8 @@ finalize() { \
|
|||||||
[ "$accounttype" = "offline" ] && printf "All done.\\n\033[33mYou should now be able to run \`\033[32mmbsync %s\033[33m\` to begin to download your mail.\033[0m\\n" "$title"
|
[ "$accounttype" = "offline" ] && printf "All done.\\n\033[33mYou should now be able to run \`\033[32mmbsync %s\033[33m\` to begin to download your mail.\033[0m\\n" "$title"
|
||||||
}
|
}
|
||||||
|
|
||||||
confirm() { printf "Are you \033[31;1mreally\033[0m sure you want to %s?\\n\t" "$@" && read -r input && ! echo "$input" | grep -i "y\(es\)*" >/dev/null && printf "That doesn't seem like a yes to me.\\n\\n" && return 1
|
confirm() { printf "Do you want to to %s?\\n\t" "$@" && read -r input && ! echo "$input" | grep -i "^y$\|^yes$ ">/dev/null && printf "That doesn't seem like a yes to me.\\n\\n" && return 1
|
||||||
printf "Are you really, really sure you want to %s?\\n\t" "$@" && read -r input && ! echo "$input" | grep -i "y\(es\)*" >/dev/null && printf "That doesn't seem like a yes to me.\\n\\n" && return 1
|
printf "Are you really, really sure you want to %s?\\n\t" "$@" && read -r input && ! echo "$input" | grep -i "^y$\|^yes$" >/dev/null && printf "That doesn't seem like a yes to me.\\n\\n" && return 1
|
||||||
return 0 ;}
|
return 0 ;}
|
||||||
|
|
||||||
pick() { numbered="$(find "$accdir" -mindepth 1 -maxdepth 1 -type d -printf "%f\n" | nl)"
|
pick() { numbered="$(find "$accdir" -mindepth 1 -maxdepth 1 -type d -printf "%f\n" | nl)"
|
||||||
@ -268,9 +268,9 @@ addtype() { ! command -v mbsync >/dev/null && printf "You must have the \`mbsync
|
|||||||
printf "Do you want to keep your mail for this account offline with mbsync? [yes/no]\\n\t"
|
printf "Do you want to keep your mail for this account offline with mbsync? [yes/no]\\n\t"
|
||||||
read -r offnot
|
read -r offnot
|
||||||
case "$offnot" in
|
case "$offnot" in
|
||||||
[Yy]es) accounttype="offline" && break ;;
|
[Yy][Ee][Ss]) accounttype="offline" && break ;;
|
||||||
[Nn]o) accounttype="online" && break ;;
|
[Nn][Oo]) accounttype="online" && break ;;
|
||||||
*) echo "I don't know what you mean. Try again or press ctrl-c to quit." ;;
|
*) echo "Write out either yes or no completely. Try again or press ctrl-c to quit." ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
addaccount ;}
|
addaccount ;}
|
||||||
|
Loading…
Reference in New Issue
Block a user