Skip to content

fix shell prompt when using reverse search

Paul Seyfert requested to merge pseyfert-PROMPTfix into master

As reported by @bcouturi and @chaen, my changes in !68 (merged) misbehave when doing more complex things than just typing characters. e.g. when using reverse search ^R the cursor is misplaced. This is because my removal of \[ and \] (which was wrongly displayed in zsh) ensured correct string length computation in bash. I haven't observed the same misbehaviour in zsh yet, but stumbled over the corresponding escape sequence %{ %} for zsh and added it. This should be fixed now. Also, thanks to @ibabusch, colour codes are now also used in zsh prompts. I quickly checked that lb-run and SetupProject produce a nice looking prompt in zsh and bash and quickly tried ^R.

Merge request reports