DEV Community

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

Collapse
 
dance2die profile image
Sung M. Kim

You gotta remember how you did this! ;p
I like how this stresses old commands less, not taking away the attention!

Collapse
 
brandonwallace profile image
brandon_wallace

I knew I should have pushed that code to Github before the hard drive crash. Lol. I will start working on it. It was not too complicated.

Thread Thread
 
dance2die profile image
Sung M. Kim

No worries and thanks for sharing and showing what's possible~!~ :)

Thread Thread
 
brandonwallace profile image
brandon_wallace

With programming you can do almost anything.

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~