Created
May 26, 2017 13:58
-
-
Save captainsafia/2754fc8c67fcfd45759b48902b0f0b73 to your computer and use it in GitHub Desktop.
Set different parts of your command prompt with different random colors
This file contains hidden or 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
# Prints username@hostname working-directory> | |
function prompt_party { | |
PS1="\[\033[38;5;$(jot -r 1 1 256)m\]\u\[\033[00m\]" | |
PS1="$PS1\[\033[38;5;$(jot -r 1 1 256)m\]@\[\033[00m\]" | |
PS1="$PS1\[\033[38;5;$(jot -r 1 1 256)m\]\h\[\033[00m\] " | |
PS1="$PS1\[\033[38;5;$(jot -r 1 1 256)m\]\w\[\033[00m\]> " | |
} | |
PROMPT_COMMAND=prompt_party |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment