Mac OS X bash prompt bug?
Posted
by Memo
on Stack Overflow
See other posts from Stack Overflow
or by Memo
Published on 2010-05-23T20:06:14Z
Indexed on
2010/05/23
20:10 UTC
Read the original article
Hit count: 387
I am trying to set my bash prompt to display the time and current directory in bold:
export PS1="\[\e[1m\][\A] \w \$ \[\e[0m\]"
This does apparently work, but when I use the command history (ctrl-r), after finding the command I was searching for and pressing enter, this line is not displayed correctly. Here is an example:
[21:58] ~/Wyona/svn-repos/zwischengas $
(reverse-i-search)`ta': tail -F logs/log4j-cnode1.log
becomes, after pressing enter:
[21:58] ~/Wyona/svn-repos/zwischengas $ -F logs/log4j-cnode1.log
Of course, this is not "really" a problem, since the command does work correctly, but it is still annoying. Does anybody know why this happens? And, more importantly, how to prevent/fix it?
Thanks,
Memo
© Stack Overflow or respective owner