New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copy/paste doesn't work properly when changing prompt colors #134
Comments
Your PS1 seems to also produce similar results in real bash (tried in Ubuntu) so it sounds like your specific prompt does funny things to bash(?) |
It should just change the colors of the prompt (and that's what it does actually). Do you think it does something else we dont see? I've asked here (hoping to get an answer). |
Your prompt is broken. You need to enclose escape sequences in pairs of |
Sorry, should have been |
I'm sorry you're right, I should take some time to read the bash manual. Sorry for that. |
I had no idea this was a thing. FWIW my PS1 ends in a newline which I presume resolves everything... |
Admittedly, the bash manual is not very clear about the importance of using the escape embedding of non-printing characters in order to enable bash (or rather readline) to maintain its proper column position. |
Open a prompt, try to do this:
export PS1="\e[1;30m-30-\e[m >"
This means if I apply colors to the prompt I can't copy/paste + change my copied code...
The text was updated successfully, but these errors were encountered: