From 23da0388ce1307fb73e56745a6f9048744bd76a1 Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Tue, 2 Jun 2026 09:17:13 +0200 Subject: [PATCH] feat(clean): Ask for confirmation --- nvim-clean.sh | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/nvim-clean.sh b/nvim-clean.sh index 8053a7e..5c1fab7 100755 --- a/nvim-clean.sh +++ b/nvim-clean.sh @@ -1,12 +1,22 @@ #!/bin/sh -git pull -rm -rf ~/.local/share/nvim*/ -rm -rf ~/.local/state/nvim*/ -rm -rf ~/.cache/nvim*/ +clean="" +echo " +Cleaning the installation will delete all your plugins, as well as file history, undo history, etc +" +read -p "Do you really want to clean the nvim installation? (y/N) " clean -echo "Installing @vue/typescript-plugin system-wide" -sudo npm i -g @vue/typescript-plugin +if [[ "$clean" == "y" ]]; then + git pull + rm -rf ~/.local/share/nvim*/ + rm -rf ~/.local/state/nvim*/ + rm -rf ~/.cache/nvim*/ -# Re-Install configs to clean out lazy-lock and all other residue -./nvim-install.sh + echo "Installing @vue/typescript-plugin system-wide" + sudo npm i -g @vue/typescript-plugin + + # Re-Install configs to clean out lazy-lock and all other residue + ./nvim-install.sh +else + echo "Aborting." +fi