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
Include update-bash section in the docs #1614
Comments
|
Thanks for the detailed description! As a first step, I recommend that you update Bash to v5.0, this can be done through Homebrew. The shipped Bash v3 is ancient... I'm also running Catalina, but with the powerline-multiline theme, in Terminal.app. A couple of comments:
I tried the echo commands with my current setup, and I don't have these issues: master → origin ~/.bash_it 08:56:06 ⚡ 86% nils.winkler
❯ echo 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
master → origin ~/.bash_it 08:56:35 ⚡ 86% nils.winkler
❯ echo 123456789012345678901234567890
123456789012345678901234567890
master → origin ~/.bash_it 08:56:46 ⚡ 86% nils.winkler
❯ This is what I have in my export BASH_IT_THEME='powerline-multiline'
export POWERLINE_LEFT_PROMPT='scm python_venv ruby cwd'
export BATTERY_AC_CHAR="⚡ "
export POWERLINE_PADDING=1
export POWERLINE_COMPACT=0Maybe give this a try to see if the Powerline theme has the same issues for you? |
|
@nwinkler Thanks for the excellent debugging instructions. As it turns out, I didn't have to go past your first suggestion. Switching to Bash 5 from Homebrew immediately solved the problems I was seeing. I knew that macOS ships an ancient version of Bash, but I'd only thought of that as an inconvenience for my own scripting. I had no idea that using it would break Bash It or, to be honest, that upgrading would be so easy (I'm already using Homebrew). Knowing this would have saved me a ton of time, and I wouldn't have wasted yours with this bug, either. What would you think about declaring a Bash requirement (4.something?) and putting this information in the README's Installation section? Something like this?
Also, now I don't think setting |
|
I like the idea of having a note in the README. We might want to add that some functionality might work with Bash 3, but there's no guarantee that everything will work. |


After using Bash-it very happily on Linux, I'm now trying it on macOS (10.15.5, with bash 3.2.57), and I'm having all sorts of weird line break/line wrap problems. The problems seem to stem from
scm_prompt_info, as they don't appear when I'm using a theme that doesn't use it or when I'm not in a git repo.The problems I'm seeing include unexpected line breaks in the middle of my prompt, early line wrapping (while I'm typing, before I get to the end of the line), line wrapping that doesn't actually advance to the next line (the cursor just returns to the beginning of the current line), and messing up the xterm title (I'm using the xterm plugin). However, the exact problems seem to vary with the theme, the terminal application (I've tried Terminal and iTerm, and both are affected), the width of the terminal window, the particular directory I'm in, and the previous command.
Here's a screen shot that shows most of these problems:
In the upper terminal, notice:
I'm using a custom theme here, but I see the same sorts of problems with built-in themes that use
scm_prompt_info.I'm using just three plugins:
Here's my
.bash_profile:It is the standard one created by the install script, with a few minor additions:
BASH_SILENCE_DEPRECATION_WARNINGto suppress the Catalina nag message when you use Bash.BASH_IT_CUSTOMto point at the directory with my custom theme and aliases.BASH_IT_THEMEto select my custom theme.Here's my theme:
Bash-it is at
~/.bash_it, but that is a symlink into my Dotbot-based dotfiles repo, where I've added Bash-it as a submodule.Strangely, what I did find solves the problem is simply commenting out the last line of my
.bash_profileand then manually sourcingbash_it.shfrom within the interactive shell. That's what the lower terminal in the screen shot shows. Notice how I'm not able to reproduce any of the problems in it.I have no idea what could be different about letting
.bash_profilesourcebash_it.shvs. manually doing it immediately afterward. So, I'm very stumped. I'm happy to try things out to get to the bottom of this, if any one has any ideas.The text was updated successfully, but these errors were encountered: