Skip to content
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

Expected prompt length leading to Terminal line overwriting #318

Open
ezramechaber opened this issue Apr 12, 2019 · 2 comments
Open

Expected prompt length leading to Terminal line overwriting #318

ezramechaber opened this issue Apr 12, 2019 · 2 comments

Comments

@ezramechaber
Copy link

I think this may be a self-created issue, but the battery status addition in my Bash profile seems to be leading to accidental visual line overwrites.

When I wrap the line, Terminal and iTerm have trouble figuring out the length of the line, and it overwrites on top of my existing text, and then if I delete back to the prompt even lets me delete part of the prompt.

Any idea what I might be doing wrong? Are there settings I should be adjusting in either the prompt or battery-status files?

Screen Shot 2019-04-12 at 11 12 29 AM

@lkgarrison
Copy link

What shell are you using? At least with bash, I believe you need to wrap non-printed characters with \[ \], though I think this may be the case for other shells too. Check out my .bashrc in my dotfiles where I wrapped color "characters" to avoid this same line wrap problem: https://github.com/lkgarrison/dotfiles/blob/1debb2df340b1bfdb1142d9c6c509b0b5582d13b/bash/bashrc.symlink#L28 (as well as a detailed comment explanation)

@ezramechaber
Copy link
Author

ezramechaber commented Sep 10, 2019 via email

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

No branches or pull requests

2 participants