1
0
mirror of https://github.com/octoleo/hosts.git synced 2024-11-22 04:45:11 +00:00

Default to 'N' in remove confirmation.

Rather than require a response, use 'N' as the default since this is a
destructive action.
This commit is contained in:
William Melody 2015-09-15 11:30:30 -07:00
parent 871e8fc131
commit ab8934ae80

7
hosts
View File

@ -999,18 +999,15 @@ remove() {
printf "Removing the following records:\n%s\n" "$target_records"
while true
do
read -p "Are you sure you want to proceed? [y/n] " yn
read -p "Are you sure you want to proceed? [y/N] " yn
case $yn in
[Yy]* )
break
;;
[Nn]* )
* )
printf "Exiting...\n"
exit 0
;;
* )
printf "Please answer yes or no.\n"
;;
esac
done
fi