On Nov 14, 2010, at 12:50 PM, Andrew Sayers wrote: > It's possible to work around this for a whole script: > > foo() { > echo -e "\033[;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0m" > } > PS1='\[$(foo)'\]>' If $(foo) were to emit some actual printable characters, won't this make bash ignore them when calculating line lengths? > As a fan of colourful prompts, I'd be very happy if you found a way > around this for parts of a script. But as a fan of fast prompts, I'd > prefer not to call __git_ps1 more than once :) I don't think there is any way around this, besides patching bash to be intelligent and determine which PS1 characters are printable itself without relying on \[ and \]. -Kevin Ballard -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html