mirror of
https://github.com/octoleo/hosts.git
synced 2024-11-25 22:27:42 +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:
parent
871e8fc131
commit
ab8934ae80
7
hosts
7
hosts
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user