Skip to content

HypeMC/bash-prompt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple bash prompt

Clone the repo to your home folder:

cd ~
git clone https://github.com/HypeMC/bash-prompt.git .bash_prompt

Add the following to your .bashrc:

. ~/.bash_prompt/prompt.sh

PROMPT_COMMAND="__prompt $color_prompt"

Without the hostname

With the hostname displayed:

. ~/.bash_prompt/prompt.sh

PROMPT_COMMAND="__prompt $color_prompt yes"

With the hostname

When the user is root:

When root

When the last exit status iz not zero:

Non-zero exit status