2024-06-26 17:24:05 +02:00
|
|
|
#! /bin/sh
|
|
|
|
set -eu
|
2021-04-26 15:25:57 +02:00
|
|
|
|
|
|
|
cat << EOF
|
2022-04-21 18:26:35 +02:00
|
|
|
_______ _______ __ __ ___ __ _
|
2021-04-26 15:25:57 +02:00
|
|
|
| _ || || | | || | | | | |
|
|
|
|
| |_| ||_ _|| | | || | | |_| |
|
|
|
|
| | | | | |_| || | | |
|
|
|
|
| | | | | || | | _ |
|
|
|
|
| _ | | | | || | | | | |
|
|
|
|
|__| |__| |___| |_______||___| |_| |__|
|
|
|
|
|
|
|
|
Magical shell history
|
|
|
|
|
|
|
|
Atuin setup
|
2023-07-31 00:08:00 +02:00
|
|
|
https://github.com/atuinsh/atuin
|
2024-06-26 17:05:32 +02:00
|
|
|
https://forum.atuin.sh
|
2021-04-26 15:25:57 +02:00
|
|
|
|
2024-06-26 17:05:32 +02:00
|
|
|
Please file an issue or reach out on the forum if you encounter any problems!
|
2021-04-26 15:25:57 +02:00
|
|
|
|
|
|
|
===============================================================================
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
2024-06-26 17:05:32 +02:00
|
|
|
__atuin_install_binary(){
|
|
|
|
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/atuinsh/atuin/releases/latest/download/atuin-installer.sh | sh
|
|
|
|
}
|
|
|
|
|
2024-06-26 17:24:05 +02:00
|
|
|
if ! command -v curl > /dev/null; then
|
2021-12-09 00:21:41 +01:00
|
|
|
echo "curl not installed. Please install curl."
|
|
|
|
exit
|
2024-06-26 17:24:05 +02:00
|
|
|
elif ! command -v sed > /dev/null; then
|
2021-12-09 00:21:41 +01:00
|
|
|
echo "sed not installed. Please install sed."
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2021-04-26 15:25:57 +02:00
|
|
|
|
2024-06-26 17:05:32 +02:00
|
|
|
__atuin_install_binary
|
2021-04-26 16:46:47 +02:00
|
|
|
|
2021-05-14 09:31:15 +02:00
|
|
|
# TODO: Check which shell is in use
|
|
|
|
# Use of single quotes around $() is intentional here
|
|
|
|
# shellcheck disable=SC2016
|
2023-12-12 11:03:22 +01:00
|
|
|
if ! grep -q "atuin init zsh" "${ZDOTDIR:-$HOME}/.zshrc"; then
|
2023-12-09 18:52:09 +01:00
|
|
|
printf '\neval "$(atuin init zsh)"\n' >> "${ZDOTDIR:-$HOME}/.zshrc"
|
2023-08-16 10:15:35 +02:00
|
|
|
fi
|
2021-04-26 16:46:47 +02:00
|
|
|
|
2021-05-14 09:31:15 +02:00
|
|
|
# Use of single quotes around $() is intentional here
|
|
|
|
# shellcheck disable=SC2016
|
2023-08-16 10:15:35 +02:00
|
|
|
|
|
|
|
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
|
2022-10-15 08:29:37 +02:00
|
|
|
|
|
|
|
cat << EOF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_______ __ __ _______ __ _ ___ _ __ __ _______ __ __
|
|
|
|
| || | | || _ || | | || | | | | | | || || | | |
|
|
|
|
|_ _|| |_| || |_| || |_| || |_| | | |_| || _ || | | |
|
|
|
|
| | | || || || _| | || | | || |_| |
|
|
|
|
| | | || || _ || |_ |_ _|| |_| || |
|
|
|
|
| | | _ || _ || | | || _ | | | | || |
|
|
|
|
|___| |__| |__||__| |__||_| |__||___| |_| |___| |_______||_______|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Thanks for installing Atuin! I really hope you like it.
|
|
|
|
|
2024-06-26 17:05:32 +02:00
|
|
|
If you have any issues, please open an issue on GitHub or visit our forum (https://forum.atuin.sh)!
|
2022-10-15 08:29:37 +02:00
|
|
|
|
2023-07-31 00:08:00 +02:00
|
|
|
If you love Atuin, please give us a star on GitHub! It really helps ⭐️ https://github.com/atuinsh/atuin
|
2022-10-15 08:29:37 +02:00
|
|
|
|
2023-07-31 00:08:00 +02:00
|
|
|
Please run "atuin register" to get setup with sync, or "atuin login" if you already have an account
|
2022-10-15 08:29:37 +02:00
|
|
|
|
|
|
|
EOF
|
2024-06-26 17:05:32 +02:00
|
|
|
|