Browse Source

Merge pull request #4464 from rchiossi/master

Ask for confirmation before uninstall
Robby Russell 9 years ago
parent
commit
01448020a7
1 changed files with 7 additions and 0 deletions
  1. 7 0
      tools/uninstall.sh

+ 7 - 0
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