Fix regexp for LP_ENABLE_TITLE

LP_ENABLE_TITLE is now fixed, at least on GNU/Linux with gnome-terminal.
This commit is contained in:
Olivier Mengué 2013-12-27 21:47:20 +01:00
parent 9c862aa896
commit d91e1422b0

View File

@ -1477,7 +1477,7 @@ _lp_as_text()
{
# Remove colors from the computed prompt
local pst
pst="$(echo "$1" | sed -$_LP_SED_EXTENDED "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g")"
pst="$(echo "$1" | sed -$_LP_SED_EXTENDED 's/\x1B\[[0-9;]*[mK]//g')"
# Remove escape sequences
# FIXME check the zsh compatibility