From ff4da7a0dc53895fe42726b8b24d46adbb621fa4 Mon Sep 17 00:00:00 2001 From: Marco <82162277+mamaraddio@users.noreply.github.com> Date: Thu, 8 Dec 2022 12:47:19 +0100 Subject: [PATCH] Source zap at the beginning of the zshrc 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 99e6f6d..b4b4b97 100755 --- a/install.sh +++ b/install.sh @@ -14,7 +14,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 }