Clean and minimal bash prompt written in pure bash script.
This script depends on the Git prompt for bash
-
Download the script
curl https://raw.githubusercontent.com/koffeinfrei/bash-prompt/master/bash-prompt > ~/.bash-prompt
-
Download the git script
curl https://raw.githubusercontent.com/koffeinfrei/bash-git-prompt/master/bash-git-prompt > ~/.bash-git-prompt
-
Add the following to your
.bash_profile
(or.bashrc
or whatever bash initialize script you use):# 1. Exposes the function `set_bash_prompt` source ~/.bash-prompt # 2a. Call the script set_bash_prompt # 2b. Call the script with chroot information (example for debian) set_bash_prompt $debian_chroot
Alternatively, if you're using some sort of dotfiles, you can add this repository as a submodule to your dotfiles and source the script directly. This is how I do it
- Shows the current directory (with chroot support)
- Shows the git status
- Uses some nice colors
- Does not show any additional clutter as the user- and hostname. That's information that I don't need on the terminal. It just wastes screen space.