From 535a59cab9302b599e08092ebf8368fbddd129d0 Mon Sep 17 00:00:00 2001 From: lainiwa Date: Sat, 10 Dec 2022 02:14:00 +0300 Subject: [PATCH] Fix sed usage in scripts/zsh_setup.sh Follow symlinks when changing zhsrc (e.g. when zshrc is managed by dotfiles manager like dotbot). Otherwise it substitutes symlinks with an ordinary file. GNU sed doesn't seem to work with `-i ''`, only with `-i''`. --- scripts/zsh_setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/zsh_setup.sh b/scripts/zsh_setup.sh index 312fc0f..0378c2a 100755 --- a/scripts/zsh_setup.sh +++ b/scripts/zsh_setup.sh @@ -43,7 +43,7 @@ validateSettings() configureZsh() { # Remove previous settings - sed -i '' '/### Codex CLI setup - start/,/### Codex CLI setup - end/d' $zshrcPath + sed -i'' '/### Codex CLI setup - start/,/### Codex CLI setup - end/d' "$(readlink -f $zshrcPath)" echo "Removed previous settings in $zshrcPath if present" # Update the latest settings