Skip to content

koffeinfrei/bash-prompt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Custom bash prompt in pure bash script.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages