From 13b0c50393646ac898deb9a7934121202ed10e38 Mon Sep 17 00:00:00 2001 From: Danny Ben Shitrit Date: Thu, 18 Sep 2025 04:57:25 +0000 Subject: [PATCH] update setup guard clause --- setup | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/setup b/setup index a9d336c..7cfafe6 100755 --- a/setup +++ b/setup @@ -7,10 +7,11 @@ fuzzy_cd_setup() { file="$1" if grep -q fuzzycd "$file"; then echo "=== Skipping $file" - else - echo "=== Amending $file" - printf "source /usr/local/bin/fuzzycd\n" >>"$file" + return fi + + echo "=== Amending $file" + printf "source /usr/local/bin/fuzzycd\n" >>"$file" patched="yes" } @@ -28,6 +29,7 @@ fuzzy_cd_setup() { } patch_startup_files() { + patched="no" echo "=== Searching for startup files" [[ -f "$HOME/.zshrc" ]] && patch_file "$HOME/.zshrc" [[ -f "$HOME/.bashrc" ]] && patch_file "$HOME/.bashrc"