Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/starship.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
format = """
$username\
$hostname\
[┌──(](bold green)$username[@](bold green)$hostname[)─[](bold green)$directory[$git_branch$git_status](bold green)[]\n](bold green)\
[┌──\\(](bold green)$username[@](bold green)$hostname[\\)─\\[](bold green)$directory[$git_branch$git_status](bold green)[\\]](bold green)\n\
$git_state\
$nodejs$python$rust$golang\
$cmd_duration\
Expand Down
4 changes: 4 additions & 0 deletions dotfiles/.zshrc.d/atuin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
# ~/.zshrc.d/atuin.zsh — Atuin shell history
# --disable-up-arrow keeps default ↑ behavior; use Ctrl-R for atuin search

# Add ~/.atuin/bin to PATH when installed via curl installer
# shellcheck source=/dev/null
[ -f "$HOME/.atuin/bin/env" ] && . "$HOME/.atuin/bin/env"

if command -v atuin >/dev/null 2>&1; then
eval "$(atuin init zsh --disable-up-arrow)"
fi
25 changes: 19 additions & 6 deletions modules/shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,26 @@ _install_zoxide() {
_install_atuin() {
if has_cmd atuin; then
info "atuin already installed"
return
fi
info "Installing atuin..."
if [ "$PKG_MGR" = "brew" ]; then
brew install atuin
else
curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | sh
info "Installing atuin..."
if [ "$PKG_MGR" = "brew" ]; then
brew install atuin
else
# ATUIN_NO_MODIFY_SHELL=1 prevents atuin's installer from appending
# init code to ~/.zshrc — our .zshrc.d/atuin.zsh handles that instead.
ATUIN_NO_MODIFY_SHELL=1 curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | ATUIN_NO_MODIFY_SHELL=1 sh
fi
fi

# Remove any lines atuin's installer may have already appended to ~/.zshrc.
# These duplicate the .zshrc.d/atuin.zsh setup and cause
# "(eval):1: can't change option: zle" on every shell start.
if grep -q '\.atuin/bin/env\|atuin init' "${HOME}/.zshrc" 2>/dev/null; then
info "Removing duplicate atuin init lines from ~/.zshrc..."
sed -i '/^\. ".*\.atuin\/bin\/env"/d' "${HOME}/.zshrc"
# shellcheck disable=SC2016 # $() in single quotes is intentional (literal match)
sed -i '/^eval "\$(atuin init/d' "${HOME}/.zshrc"
success "Cleaned up ~/.zshrc"
fi
}

Expand Down
Loading