Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Do you have a shorter test case that demonstrates the problem? The bash tag wiki has tips on how to reduce posted code size. Commented Jul 30, 2014 at 17:58
  • @thatotherguy, k, I've taken out everything that I didn't think was necessary for the script. Essentially the prompt_git function is designed to find changes in the repo and add a string so you can see this in the prompt, and I have a different check in the set_prompts function that determines if the branch has uncommitted changes or unstaged changes and sets the color accordingly. I'm fine with this all being done in 1 or many functions, whatever is the best result. Commented Jul 30, 2014 at 18:27
  • Don't just remove what's not required in your script -- remove everything that's not required to reproduce the particular color issue you're posting about. For example, is this sufficient to reproduce the issue? echo "$(tput setaf 210)Why is this text white instead of pink" Commented Jul 30, 2014 at 18:44
  • @thatotherguy, so I removed all of the colors that weren't be used in this example and commented on what those colors are, because to be honest it doesnt' matter what the colors are, I just want the prompt to have 3 color variations for uncommitted changes, unstaged changes, and everything else. Commented Jul 30, 2014 at 19:02