Skip to content

Commit

Permalink
Only setup shell plugin if it's not already there (#1178)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellie authored Aug 16, 2023
1 parent e356ffa commit 72c6b17
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,18 @@ esac
# TODO: Check which shell is in use
# Use of single quotes around $() is intentional here
# shellcheck disable=SC2016
printf '\neval "$(atuin init zsh)"\n' >> ~/.zshrc
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
echo 'eval "$(atuin init bash)"' >> ~/.bashrc

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
Expand Down

1 comment on commit 72c6b17

@vercel
Copy link

@vercel vercel bot commented on 72c6b17 Aug 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

atuin-docs – ./

atuin-docs-git-main-atuin.vercel.app
atuin-docs.vercel.app
atuin-docs-atuin.vercel.app

Please sign in to comment.