mirror of
https://github.com/b-ryan/powerline-shell.git
synced 2026-09-10 07:26:28 -04:00
Fix double-escape of user/root ($/#) indicator (fixes #315)
If our segment is ' \\$ ' then it is already sanitized and should not be escaped again, so we avoid it.
This commit is contained in:
parent
87b176037f
commit
235d3a8fda
|
|
@ -129,7 +129,7 @@ class Powerline(object):
|
|||
|
||||
def draw_segment(self, idx):
|
||||
segment = self.segments[idx]
|
||||
if self.args.shell == "bash":
|
||||
if self.args.shell == "bash" and segment[0] != ' \\$ ':
|
||||
sanitized = re.sub(r"([`$])", r"\\\1", segment[0])
|
||||
else:
|
||||
sanitized = segment[0]
|
||||
|
|
|
|||
Loading…
Reference in a new issue