Skip to content

Commit

Permalink
Source zap at the beginning of the zshrc (#84)
Browse files Browse the repository at this point in the history
It avoids that beginners zsh, or maybe shell, users have to think about where to put a line in their zshrc.
  • Loading branch information
mamaraddio authored Dec 28, 2022
1 parent 2cb55cc commit 6bc2304
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 6bc2304

Please sign in to comment.