🧈 ButterBash | Note |Todo | modular fun.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-11 20:43:59 -05:00
bash butterbian gets a butter icon in the header, derivatives fall back to their parent's 2026-11-11 20:39:15 -05:00
yazi add yazi module and ansi-only theme 2026-10-15 15:26:27 -04:00
.gitignore init for butterbash 2025-08-20 14:11:25 -04:00
bashrc.example stop forcing LC_ALL, set LANG only when the system hasn't 2026-11-11 20:21:28 -05:00
DOCUMENTATION.md stop forcing LC_ALL, set LANG only when the system hasn't 2026-11-11 20:21:28 -05:00
install.sh installer offers bash as login shell and drops you into it when it finishes 2026-11-11 20:43:59 -05:00
LICENSE Add GPL-2.0 license 2026-02-01 17:59:06 -05:00
README.md installer keeps files you added to the config dir on reinstall 2026-11-11 20:25:50 -05:00

🍞 ButterBash

Made for Debian Bash Stars Forks Last Commit

A .bashrc split into small files you can actually read. You get a git-aware prompt, a few safer defaults, fzf and zoxide wired in, and a handful of functions worth having, plus git and apt aliases you can trim.

Install

git clone https://justaguy.dev/drew/butterbash.git
cd butterbash
./install.sh

The installer backs up your .bashrc and any existing ~/.config/bash, copies the new files in, installs the tools it relies on through your package manager. Open a new terminal when it finishes.

ButterBash is also option 1 in the butterscripts optional tools menu.

To undo it, put the backup back:

cp ~/.bashrc.backup.<timestamp> ~/.bashrc
rm -rf ~/.config/bash

What you get

Prompt

18:42:07 drew at box in ~/Code/butterbash (main*)
✔ $

Time, user, host, directory, and the git branch with * when the tree is dirty. The second line shows ✔, or ✘ and the exit code, for the last command. [ssh] shows in red on remote sessions. Once per session a header line prints the OS, kernel, window manager and bash version.

Aliases

The core set only changes how commands you already type behave, so there is nothing to memorize:

.. ... .... - up one, two, three, back
ls l ll la lt lh eza with icons and directories first, plain ls if eza is missing
cp mv rm mkdir ask before overwriting, rm -I, mkdir -p, all verbose
df du free human-readable sizes
grep color
top btop, then htop, then top
bashrc reload edit or re-source ~/.bashrc
ff hi fastfetch, a desktop notification

On top of that come extra sets with names of their own. git and apt are on, shortcuts is off. Pick yours on this line in ~/.bashrc, then reload:

BUTTERBASH_EXTRAS=(git apt)
Set Adds
git g gs ga gaa gc gcm gp gpu gpl gco gb gd gl gclone
apt inst search update upgrade remove uplist autoremove
shortcuts editors v vv e n, one-letter x c h j, mem cpu biggest myip listening k9 now week, switch to zsh and back

Navigation

zoxide takes over cd. Full paths, - and .. work as before, and cd <fragment> jumps to the best-matching directory you have been in. cdi opens an fzf picker with a preview. Typing a directory name on its own also changes into it.

y runs yazi and leaves the shell in whatever directory you quit from.

Functions

mkcd dir make it and go there
extract file any archive: tar, gz, bz2, xz, zst, zip, rar, 7z
backup file timestamped copy next to the original
calc 2+2 bc with two decimals
sysinfo host, OS, kernel, uptime, memory, load, disk
psg name ps aux filtered, header kept
hgrep term search history
dirsize [dir] one number
path PATH, one entry per line
vf fzf a file with preview, open in $EDITOR
fkill fzf a process, kill it

Keys

Up / Down history filtered by what you have typed so far
Ctrl+R fzf history search
Ctrl+T fzf file picker, pastes the path
Alt+C fzf directory picker, cd into it
Ctrl+L clear

Shell options

History holds 10,000 entries in memory and 20,000 on disk, written after every command, with duplicates and the usual noise (ls, cd, exit) dropped. autocd, cdspell, globstar and case-insensitive globbing are on. Man pages are colored. EDITOR picks the first of nvim, vim, micro, nano that exists.

Make it yours

  • Any *.bash file you drop into ~/.config/bash/ loads on the next shell. custom.bash is a fine name. Re-running the installer keeps it.
  • ~/.bashrc.local loads last and is for machine-specific exports and aliases. The installer never touches it.
  • The shipped files are short. Edit them, but know that re-running the installer swaps in fresh copies (yours stay in the backup).

Files

~/.config/bash/
├── aliases.bash        core aliases
├── prompt.bash         prompt and session header
├── keybinds.bash       readline bindings
├── fzf.bash            fzf options, vf, fkill
├── zoxide.bash         cd and cdi
├── yazi.bash           y
├── functions/
│   ├── system.bash     sysinfo, psg, install_tools
│   └── utils.bash      mkcd, extract, backup, calc, hgrep, dirsize, path
└── optional/           extras, loaded only if listed in BUTTERBASH_EXTRAS
    ├── git.bash
    ├── apt.bash
    └── shortcuts.bash

Requirements

Bash 4 or newer. The installer pulls in fzf, ripgrep, fd, bat, eza and zoxide with apt, dnf, pacman or brew, and every file checks for its tool before doing anything, so a missing one just means that feature is off.

Not installed for you: yazi for y, and xclip or wl-clipboard for clipboard use. A starter ~/.config/yazi/theme.toml that follows your terminal colors is dropped in if you have none.

Contributing

Issues and pull requests at https://justaguy.dev/drew/butterbash. For anything larger than a fix, open an issue first.

Support

Buy me a coffee

Connect

License

GPL-2.0. See LICENSE.


Made with 🧈 by JustAGuyLinux