Skip to content
Custom bash prompt in pure bash script.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
vendor update git prompt May 13, 2019
.gitmodules extract bash prompt from dotfiles May 10, 2019
LICENSE add license May 11, 2019
README.md actually link to the bash-git-prompt repository May 11, 2019
bash-prompt fix indentation May 10, 2019
screenshot.png document usage as submodule May 10, 2019

README.md

Bash prompt

Clean and minimal bash prompt written in pure bash script.

Bash Git prompt

This script depends on the Git prompt for bash

Usage

  1. Download the script

    curl https://raw.githubusercontent.com/koffeinfrei/bash-prompt/master/bash-prompt > ~/.bash-prompt
  2. Download the git script

    curl https://raw.githubusercontent.com/koffeinfrei/bash-git-prompt/master/bash-git-prompt > ~/.bash-git-prompt
  3. 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

What it does

  1. Shows the current directory (with chroot support)
  2. Shows the git status
  3. Uses some nice colors
  4. 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.
You can’t perform that action at this time.