Files
quartz/content/10-19 LIFE/13 TECH SETUP/13.13 OS SETUP/Shell.md
Quartz Syncer 125a9b1752
All checks were successful
Build and Deploy Quartz / build (push) Successful in 26s
Published multiple files
2026-02-05 09:53:27 -07:00

2.7 KiB
Raw Blame History

publish, permalink, title, created, modified, tags, cssclasses
publish permalink title created modified tags cssclasses
true /10-19 LIFE/13 TECH SETUP/13.13 OS SETUP/Shell.md Shell 2026-01-29T16:18:01.019-07:00 2026-02-05T09:44:18.943-07:00
shell
terminal
bash

Shell configuration with Bash, Starship prompt, and Atuin history.

Starship Prompt

Starship is a fast, customizable prompt that works with any shell.

Installation

curl -sS https://starship.rs/install.sh | sh

Or via pacman:

sudo pacman -S starship

Bash Integration

Add to ~/.bashrc:

eval "$(starship init bash)"

Configuration

Config location: ~/.config/starship.toml

# Minimal prompt
format = """
$directory\
$git_branch\
$git_status\
$character"""

[directory]
truncation_length = 3
truncate_to_repo = true

[git_branch]
symbol = " "

[git_status]
format = '([$all_status$ahead_behind]($style) )'

[character]
success_symbol = "[](green)"
error_symbol = "[](red)"

Atuin (Shell History)

See 10-19 LIFE/13 TECH SETUP/13.11 APPS/atuin for full setup. Quick integration:

# Install
curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | sh

# Add to ~/.bashrc
. "$HOME/.atuin/bin/env"
[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh
eval "$(atuin init bash)"

My .bashrc Structure

I keep my bashrc clean by sourcing external files:

# ~/.bashrc

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

# Basic aliases
alias ls='ls --color=auto'
alias grep='grep --color=auto'

# PATH
export PATH="/home/phil/.local/bin:$PATH"
export PATH="$HOME/.npm-global/bin:$PATH"
export PATH="$PATH:$HOME/go/bin"

# Starship
eval "$(starship init bash)"

# Atuin
. "$HOME/.atuin/bin/env"
[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh
eval "$(atuin init bash)"

# Custom config (aliases, functions)
source ~/.config/dotfiles/aliases
source ~/.config/dotfiles/functions

# Completions
source <(openclaw completion --shell bash)

Modular Config

Keep aliases and functions in separate files:

~/.config/dotfiles/
├── aliases      # alias definitions
└── functions    # shell functions

This keeps .bashrc clean and makes it easy to version control customizations separately.

Useful Tools

sudo pacman -S \
  fzf        # Fuzzy finder
  bat        # Better cat
  eza        # Better ls
  ripgrep    # Better grep
  fd         # Better find

fzf Integration

# Add to ~/.bashrc
source /usr/share/fzf/key-bindings.bash
source /usr/share/fzf/completion.bash

Keybindings:

  • Ctrl+R — Search history (or use Atuin)
  • Ctrl+T — Search files
  • Alt+C — cd into directory

Resources