mirror of
https://github.com/octoleo/hosts.git
synced 2024-11-26 06:46:43 +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"
|
printf "Removing the following records:\n%s\n" "$target_records"
|
||||||
while true
|
while true
|
||||||
do
|
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
|
case $yn in
|
||||||
[Yy]* )
|
[Yy]* )
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
[Nn]* )
|
* )
|
||||||
printf "Exiting...\n"
|
printf "Exiting...\n"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
* )
|
|
||||||
printf "Please answer yes or no.\n"
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user