From 6b73f5ec7504ebc118d4bb6fdfaf841333f9c7a4 Mon Sep 17 00:00:00 2001 From: Rodrigo Chiossi Date: Mon, 5 Oct 2015 18:32:42 -0300 Subject: [PATCH] Ask for confirmation before uninstall Prompt the user before removing oh-my-zsh from the system --- tools/uninstall.sh | 7 +++++++ 1 file changed, 7 insertions(+) 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