Skip to content

Instantly share code, notes, and snippets.

@joehakimrahme
Created June 15, 2012 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joehakimrahme/2938009 to your computer and use it in GitHub Desktop.
Save joehakimrahme/2938009 to your computer and use it in GitHub Desktop.
prompt() bash function
prompt () {
[[ $# = 1 ]] || exit 255
mode="$1"
case "$mode" in
none)
export PS1=""
;;
off)
export PS1="$ "
;;
date)
export PS1="[\t]\$ "
;;
basic)
export PS1="\u:\w$ "
;;
full)
export PS1="[\t]\u:\w$ "
;;
esac
}
prompt basic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment