Skip to content

Fix support virtualenv#122

Open
francescpuig7 wants to merge 1 commit intoarialdomartini:masterfrom
francescpuig7:patch-2
Open

Fix support virtualenv#122
francescpuig7 wants to merge 1 commit intoarialdomartini:masterfrom
francescpuig7:patch-2

Conversation

@francescpuig7
Copy link

@francescpuig7 francescpuig7 commented Oct 17, 2017

It is necessary to escape ALL the non-printable characters so you can bash it correctly.
It is necessary to escape the full character (\e[0;31m) by using: \[...\], with "\[\e[0;31m\], because it only takes up the first semicolon ;
Otherwise, you can not find the entire non-printable character, and the bash does not have a normal behavior.

Ex when you print a long line:

(name_virtualenv) user@user-pc:~$ aa
aaaaairtualenv) user@user-pc:~$ aaaaaaaaaaaaaaaaaaaaaaaa

Now, this causes the non-printable characters to escape correctly:

(name_virtualenv) user@user-pc:~$ aaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant