Created
June 15, 2012 18:23
-
-
Save joehakimrahme/2938009 to your computer and use it in GitHub Desktop.
prompt() bash function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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