From 796a8f59a61ed6e54d0d2b41a5d0155c5bb9696b Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Wed, 10 Jun 2026 21:32:08 +0200 Subject: chore: Remove unneeded files --- install.sh | 197 ------------------------------------------------------------- 1 file changed, 197 deletions(-) delete mode 100755 install.sh (limited to 'install.sh') diff --git a/install.sh b/install.sh deleted file mode 100755 index bd82d6da..00000000 --- a/install.sh +++ /dev/null @@ -1,197 +0,0 @@ -#! /bin/sh -set -eu - -ATUIN_NON_INTERACTIVE="no" - -for arg in "$@"; do - case "$arg" in - --non-interactive) ATUIN_NON_INTERACTIVE="yes" ;; - *) ;; - esac -done - -if [ "$ATUIN_NON_INTERACTIVE" != "yes" ]; then - if [ -t 0 ] || { true /dev/null; then - ATUIN_NON_INTERACTIVE="no" - else - ATUIN_NON_INTERACTIVE="yes" - fi -fi - -cat << EOF - _______ _______ __ __ ___ __ _ -| _ || || | | || | | | | | -| |_| ||_ _|| | | || | | |_| | -| | | | | |_| || | | | -| | | | | || | | _ | -| _ | | | | || | | | | | -|__| |__| |___| |_______||___| |_| |__| - -Magical shell history - -Atuin setup -https://github.com/atuinsh/atuin -https://forum.atuin.sh - -Please file an issue or reach out on the forum if you encounter any problems! - -=============================================================================== - -EOF - -__atuin_install_binary(){ - curl --proto '=https' --tlsv1.2 -LsSf https://github.com/atuinsh/atuin/releases/latest/download/atuin-installer.sh | sh -} - -if ! command -v curl > /dev/null; then - echo "curl not installed. Please install curl." - exit -fi - - -__atuin_install_binary - -# TODO: Check which shell is in use -# Use of single quotes around $() is intentional here -# shellcheck disable=SC2016 -if ! grep -q "atuin init zsh" "${ZDOTDIR:-$HOME}/.zshrc"; then - printf '\neval "$(atuin init zsh)"\n' >> "${ZDOTDIR:-$HOME}/.zshrc" -fi - -# Use of single quotes around $() is intentional here -# shellcheck disable=SC2016 - -if ! grep -q "atuin init bash" ~/.bashrc; then - curl --proto '=https' --tlsv1.2 -LsSf 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 - -if [ -f "$HOME/.config/fish/config.fish" ]; then - if ! grep -q "atuin init fish" "$HOME/.config/fish/config.fish"; then - printf '\nif status is-interactive\n atuin init fish | source\nend\n' >> "$HOME/.config/fish/config.fish" - fi -fi - -ATUIN_BIN="$HOME/.atuin/bin/atuin" - -__atuin_install_agent_hook(){ - agent="$1" - agent_name="$2" - agent_config_dir="$3" - shift 3 - - detected="no" - - if [ -d "$agent_config_dir" ]; then - detected="yes" - else - for agent_command in "$@"; do - if command -v "$agent_command" > /dev/null 2>&1; then - detected="yes" - break - fi - done - fi - - if [ "$detected" = "yes" ]; then - echo "Detected $agent_name — installing Atuin hooks..." - if ! "$ATUIN_BIN" hook install "$agent"; then - echo "Failed to install Atuin hooks for $agent_name (this version of Atuin may not support it yet)." - fi - echo "" - fi -} - -__atuin_install_agent_hook "claude-code" "Claude Code" "$HOME/.claude" claude -__atuin_install_agent_hook "codex" "Codex" "$HOME/.codex" codex -__atuin_install_agent_hook "pi" "pi" "$HOME/.config/pi" pi - -echo "" -echo "Atuin installed successfully!" -echo "" - -if [ "$ATUIN_NON_INTERACTIVE" != "yes" ]; then - - printf "Would you like to import your existing shell history into Atuin? [Y/n] " - read -r import_answer