Skip to content

Commit

Permalink
_lp_title: fix _LP_CLEAN_ESC for bash
Browse files Browse the repository at this point in the history
Thanks to Panayiotis Kkolos (@pkkolos) for the catch
3c7c6f6#commitcomment-11020770
  • Loading branch information
dolmen committed May 5, 2015
1 parent c7cffa8 commit 1fc0308
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions liquidprompt
Original file line number Diff line number Diff line change
Expand Up @@ -1465,11 +1465,8 @@ _lp_temperature() {

# Sed expression using extended regexp to match terminal
# escape sequences with their wrappers
# The generic solution, but unreadable:
# _LP_CLEAN_ESC="$(printf "s,%q|%q,,g" "$_LP_OPEN_ESC" "$_LP_CLOSE_ESC")"
# Hardcoded solution:
if $_LP_SHELL_bash; then
_LP_CLEAN_ESC='\\\[([^\\]+|\\[^\]])*\\\]'
_LP_CLEAN_ESC='\\\[([^\]+|\\[^]])*\\\]'
else
_LP_CLEAN_ESC='%\{([^%]+|%[^}])*%\}'
fi
Expand Down

0 comments on commit 1fc0308

Please sign in to comment.