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.

4
  • I will not accept my own answer if someone else want to give a better and more informative answer who explains the situation in more detail. Commented Oct 4, 2012 at 13:29
  • You pretty much got it - the \[ and \] are hints to bash to tell it how much physical space your prompt takes up, and since the test part is sort of floating outside your main prompt it shouldn't be included. Commented Oct 4, 2012 at 14:13
  • @nsg You may want to accept your answer, there is nothing wrong with that and it will prevent your question from floating around as having no accepted answer. Commented Oct 18, 2013 at 9:01
  • True, I had forgotten this one. Thanks for the reminder. Commented Oct 25, 2013 at 15:22