After writing a new prompt for Bash, I noticed that one character of my commands were being lost when it wrapped to the new line. Here is an image of the example (I typed 1234567890 over and over):

prompt

Here is my $PS1

PS1="\n   [\[\e[0;90m\]\d \t\[\e[0m\]] [\[\e[0;90m\]\$(/bin/ls -1 | /usr/bin/wc -l | /bin/sed 's: ::g') files, \$(/usr/bin/du -sh | cut -f1)\[\e[0m]\n[\[\e[0;36m\]\#\[\e[0m]\] \[\e[0;95m\]\u\[\e[0;90m\]@\[\e[1;92m\]\h\[\e[0m\]: \[\e[1;34m\]\w \[\e[1;30m\]\$\[\e[0m\] "

What have I done wrong?

link|improve this question

What's this bit for \[\e[0m]\]? Is the ] supposed to be there? – Mikel Apr 17 '11 at 23:08
feedback

1 Answer

up vote 0 down vote accepted

What's this bit for \[\e[0m]\]?

Is the ] after the m supposed to be there?

link|improve this answer
You fixed it! The first ] needed to go at the end (to become \[\e[0m\]]). Thanks! – squircle Apr 18 '11 at 2:48
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.