Only setup shell plugin if it's not already there (#1178)
This commit is contained in:
parent
e356ffaeba
commit
72c6b17ac7
1 changed files with 9 additions and 4 deletions
|
@ -176,13 +176,18 @@ esac
|
|||
# TODO: Check which shell is in use
|
||||
# Use of single quotes around $() is intentional here
|
||||
# shellcheck disable=SC2016
|
||||
if ! grep -q "atuin init zsh" ~/.zshrc; then
|
||||
printf '\neval "$(atuin init zsh)"\n' >> ~/.zshrc
|
||||
fi
|
||||
|
||||
curl https://raw.githubusercontent.com/rcaloras/bash-preexec/master/bash-preexec.sh -o ~/.bash-preexec.sh
|
||||
printf '\n[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh\n' >> ~/.bashrc
|
||||
# Use of single quotes around $() is intentional here
|
||||
# shellcheck disable=SC2016
|
||||
|
||||
if ! grep -q "atuin init bash" ~/.bashrc; then
|
||||
curl https://raw.githubusercontent.com/rcaloras/bash-preexec/master/bash-preexec.sh -o ~/.bash-preexec.sh
|
||||
printf '\n[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh\n' >> ~/.bashrc
|
||||
echo 'eval "$(atuin init bash)"' >> ~/.bashrc
|
||||
fi
|
||||
|
||||
cat << EOF
|
||||
|
||||
|
|
Loading…
Reference in a new issue