A prompt with docker/git and diskspace analyzer written in pure bash
Find a file
2025-12-05 22:12:35 +01:00
assets added error code handling preview and added some sanity checks 2025-10-29 11:50:54 +01:00
LICENSE refactor my latest changes into the README and the prompt itself. 2025-10-23 11:44:04 +02:00
pure.bash added a new example for the prompt symbol 2025-12-05 22:12:35 +01:00
README.md added documentation about the added variables/settings 2025-11-18 22:24:31 +01:00

a pure bash prompt

Pure bash prompt with git integration, docker compose project detection and diskspace analyzer direcly in pure bash

Inspired by krashikiworks/pure-prompt-bash

Preview

disk-analyzer:

Displays the available space in numbers. The icon shows, how much space is already taken

Coloring has values for above 33%, above 66%, above 87%, and less

ENABLE_DISKSPACE=true

ENABLE_NERDFONTS=false

disk-analyzer


ENABLE_NERDFONTS=true

disk-analyzer-nerdfont


error-codes:

Does only show the error codes on error codes bigger than 0

ENABLE_ERROR_CODES=true

error-code-above-0


git-status:

ENABLE_GIT=true

git-status


docker-status:

ENABLE_DOCKER=true

docker-showcase

Install

just clone this repository (or just copy pure.bash) anywhere, and add

source /path/to/pure.bash

to your .bashrc

settings

You can set some settings in the prompt file itself:

key default_value properties
ENABLE_DISKSPACE true Enables the diskspace widget
ENABLE_DOCKER true Enables or disables the docker widget
DOCKER_SANITIZE_NAME false Enables or disables the docker project name sanitization
ENABLE_ERROR_CODES true Enables the error code display inline
ENABLE_GIT true Enables or disables the git widget
ENABLE_NERDFONTS true Enables or disables nerdfonts in all widgets
ENABLE_SSH true Enables the ssh detection with hostname prefix for ssh sessions
ENABLE_UPTIME false Enables the uptime widget
ENABLE_YAZI true (when yazi is installed) Displays an indicator if inside a yazi spawned sub-shell
INFO_LINE_ON_NEWLINE true Displays the information (diskspace, uptime, yazi) onto a separate line below the docker-line. Set to false to disable

Uninstall

just remove what you downloaded, and delete source command from your .bashrc

License

MIT License. See LICENSE.