-
Notifications
You must be signed in to change notification settings - Fork 990
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
powerline and iTerm2 shell integration no longer working together #1844
Comments
You must have something else in the bashrc, neither iTerm shell integration nor powerline defines __bp_precmd_invoke_cmd. First deal with that, I do not see any issues with iTerm integration except for that it has a bug. Also when I have POWERLINE_BASH_CONTINUATION=1
POWERLINE_BASH_SELECT=1
source ~/.vam/powerline/powerline/bindings/bash/powerline.sh
source ~/tmp/iterm2_shell_integration PROMPT_COMMAND is I must say though that iTerm2 shell integration contains a serious bug which prevents powerline prompt from working correctly in case somebody (including powerline itself which it does when run in tmux unless tmux integration is disabled, though iterm integration does not support tmux so it did not hit them yet) is using the same method of appending to PROMPT_COMMAND: it has PROMPT_COMMAND="$(echo -n $PROMPT_COMMAND | sed -e 's/; *$//'); iterm2_preexec_invoke_cmd"; : note that
In any case I do not see this as powerline or iterm integration issue, deal with whatever is adding _bp… thingies. |
iTerm2 definitely uses bash-preexec -- it's where bash-preexec originated. I think you're looking at an old version of the iterm2 shell integration, from before (And, FYI the weird |
In any case, the latest release (v0.3.4) of
|
For anyone else googling up this issue until iterm2 incorporates the new bash-preexec: just copy-paste v0.3.4 into your |
@lastobelus I downloaded iTerm2 shell integration using the link suggested in https://www.iterm2.com/documentation-shell-integration.html (i.e. https://iterm2.com/misc/bash_startup.in) and it neither contains |
I had this same problem, my echo $PROMPT_COMMAND
__bp_precmd_invoke_cmd; __bp_interactive_mode The workaround for me was to append ...
# Regular powerline configuration
powerline-daemon -q
POWERLINE_BASH_CONTINUATION=1
POWERLINE_BASH_SELECT=1
source <powerline_folder>/powerline.sh
# Next line is the workaround
precmd_functions+=(_powerline_set_prompt)
... Hope this helps somebody. |
For others coming across the same issue 2 1/2 years later, here's the workaround that worked for me with a recent release on Mac OS Mojave w/iTerm 2 installed:
|
iTerm2: Build 3.1.4.beta.1
powerline: 2.6
Contents of bash_login:
Contents of $PROMPT_COMMAND:
The very first prompt of a shell works (iterm's little chevron is present and the first command gets recorded in
Toolbelt > Command History
All subsequent prompts do not call the iterm shell integration functions.
The behaviour is the same regardless of who is given first crack at PS1 (ie, if I move the iterm shell integration initializer below powerline's).
The text was updated successfully, but these errors were encountered: