From 6bc23044b0d8221a5c68f3ec67c906e02dd6f41e Mon Sep 17 00:00:00 2001 From: Marco <82162277+mamaraddio@users.noreply.github.com> Date: Wed, 28 Dec 2022 09:59:51 +0100 Subject: [PATCH] Source zap at the beginning of the zshrc (#84) It avoids that beginners zsh, or maybe shell, users have to think about where to put a line in their zshrc. --- install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 7b47af1..b2292fa 100755 --- a/install.sh +++ b/install.sh @@ -15,7 +15,8 @@ main() { # shellcheck disable=SC2016 if ! grep -q '[ -f "$HOME/.local/share/zap/zap.zsh" ] && source "$HOME/.local/share/zap/zap.zsh"' "$zshrc"; then - echo '[ -f "$HOME/.local/share/zap/zap.zsh" ] && source "$HOME/.local/share/zap/zap.zsh"' >> "$zshrc" + sed -i '1 i\ +[ -f "$HOME/.local/share/zap/zap.zsh" ] && source "$HOME/.local/share/zap/zap.zsh"' "$zshrc" fi }