mirror of
https://github.com/SinTan1729/random.git
synced 2024-12-26 05:08:36 -06:00
Prompt before permanent delete
This commit is contained in:
parent
59a3bf9efe
commit
558a8a0765
1 changed files with 4 additions and 1 deletions
|
@ -6,7 +6,10 @@
|
|||
# Pass "-delete" to delete files instead of trashing.
|
||||
|
||||
if [ "$1" = "--delete" ]; then
|
||||
echo "Warning: Deleting instead of trashing."
|
||||
read -p "Warning: Deleting instead of trashing. Continue? [y/N]: " resp
|
||||
if [ $resp != "y" ] && [ $resp != "Y" ]; then
|
||||
exit
|
||||
fi
|
||||
d=1
|
||||
else
|
||||
echo "Trashing files by default, pass --delete to delete instead."
|
||||
|
|
Loading…
Reference in a new issue