DEV Community

Discussion on: Show off your Terminal Setup 👩🏻‍💻💯

Collapse
 
brandonwallace profile image
brandon_wallace

Here it is. lol

count=232;

# Set the prompt to change colors on execution of each command.
function bash_prompt(){
    PS1="\033[38;5;${count}m"' \W \$ '"\033[00m"
    count=$((count+1));
    [ $count -eq 255 ] && count=232;
}

PROMPT_COMMAND=bash_prompt
Enter fullscreen mode Exit fullscreen mode

bash-prompt-color-change-on-execution.png

gist.github.com/brandon-wallace/7b...

Thread Thread
 
dance2die profile image
Sung M. Kim

ty for sharing~ woohoo~