summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRodrigo Chiossi <rodrigo.chiossi@intel.com>2015-10-05 18:32:42 -0300
committerRodrigo Chiossi <rodrigo.chiossi@intel.com>2015-10-05 18:32:42 -0300
commit6b73f5ec7504ebc118d4bb6fdfaf841333f9c7a4 (patch)
tree05fbeb470adb0030abcacd4c0b53ebac591952dd
parentf3fa41834d9c954ee2d352c6c5b60d72f7a93593 (diff)
downloadzsh-6b73f5ec7504ebc118d4bb6fdfaf841333f9c7a4.tar.gz
zsh-6b73f5ec7504ebc118d4bb6fdfaf841333f9c7a4.tar.bz2
zsh-6b73f5ec7504ebc118d4bb6fdfaf841333f9c7a4.zip
Ask for confirmation before uninstall
Prompt the user before removing oh-my-zsh from the system
-rw-r--r--tools/uninstall.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/uninstall.sh b/tools/uninstall.sh
index 23bfac0eb..f9da00c9b 100644
--- a/tools/uninstall.sh
+++ b/tools/uninstall.sh
@@ -1,3 +1,10 @@
+read -r -p "Are you sure you want to remove Oh My Zsh? [y/N] " confirmation
+if ! [[ $confirmation =~ ^[yY]$ ]]
+then
+ echo "Uninstall cancelled"
+ exit
+fi
+
echo "Removing ~/.oh-my-zsh"
if [ -d ~/.oh-my-zsh ]
then