0

I have a custom prompt (with powerline) configured for bash shell. However, it is not displayed until I issue the first command or press enter.

custom prompt is only displayed after first command

I currently use iTerm2 as terminal application and bash installed with brew.

On the other computer where I also have Powerline installed and the same configuration files it is always displayed when opening the shell.

The chunk of code that sets the powerline prompt is in the .bash_profile file:

# add support for powerline-status
powerline-daemon -q
POWERLINE_BASH_CONTINUATION=1
POWERLINE_BASH_SELECT=1
. /usr/local/lib/python2.7/site-packages/powerline/bindings/bash/powerline.sh

My guess is that it may be due to any setting the prompt in a bash file that might be loaded later or something related but I don't know how to fix it.

Thomas Dickey
  • 51,086
  • 7
  • 70
  • 105
blamblam
  • 423
  • 6
  • 20

1 Answers1

0

It seems that the strange behavior of the command prompt is due to shell integration feature of iTerm2.

It turns out that in this computer, freshly re-installed from scratch I installed the beta version of Iterm2 (obviously as any other beta still under development) and the shell integration causes this. Guess still needs some more improvements.

After uninstalling it and a reboot, custom prompt is always displayed.

Anyway, the features provided by shell integration are far superior to this minor inconvenience. After all, it is only the first time the prompt is displayed.

blamblam
  • 423
  • 6
  • 20