Persist bash history and bake shell quality-of-life defaults
Two changes that address a longstanding frustration: bash history is lost on every container recreate, and the container's ~/.bashrc and ~/.inputrc are stock Debian (no history tuning, no prefix search on arrow keys, no integrations). Added a named volume 'devbox-shell-history' mounted at ~/.cache/bash with HISTFILE pointing there; history now survives 'docker compose up --force-recreate'. The volume is added to both docker-compose.yml and docker-compose.shared.yml, and ~/.cache/bash is registered in the entrypoint ownership-fix loop per the AGENTS.md convention. Baked rootfs/home/developer/.bash_aliases (sourced automatically by Debian's default ~/.bashrc) and rootfs/home/developer/.inputrc into the image. They give new containers: 100k-entry timestamped dedup history with per-prompt flush, Up/Down arrow prefix history search, case-insensitive coloured completion, aliases that prefer eza and bat when present, git shortcuts, interactive rm/mv/cp, zoxide and fzf (via 'fzf --bash') integration, and a [devbox] prompt marker. The fzf integration uses 'fzf --bash' because we install fzf from GitHub releases, not apt — the apt-path key-bindings aren't present. Users who prefer their host's own shell config can uncomment two commented bind-mount lines in docker-compose.yml to shadow the baked defaults.
This commit is contained in:
@@ -39,6 +39,9 @@ services:
|
||||
# Persist opencode data (auth, memory, session history)
|
||||
- devbox-data:/home/developer/.local/share/opencode
|
||||
|
||||
# Persist bash history across container recreations
|
||||
- devbox-shell-history:/home/developer/.cache/bash
|
||||
|
||||
# Persist uv data (Python installs)
|
||||
- devbox-uv:/home/developer/.local/share/uv
|
||||
|
||||
@@ -47,4 +50,5 @@ services:
|
||||
|
||||
volumes:
|
||||
devbox-data:
|
||||
devbox-shell-history:
|
||||
devbox-uv:
|
||||
|
||||
Reference in New Issue
Block a user