twolfson / sexy-bash-prompt

Bash prompt with colors, git statuses, and git branches.
MIT License
1.14k stars 154 forks source link

Error on Mac OS 12.5 #95

Closed hubefonseca closed 2 years ago

hubefonseca commented 2 years ago

Hi!

I tried to install using the command line, but it does not display correctly, as shown on the image below:

image
hubefonseca commented 2 years ago

Forgot to mention that I am using iterm 2, but the result is the same on the classical terminal

image

bigfishtoddslivewire commented 2 years ago

I think it's a restricted command now

On Mon, Aug 15, 2022, 3:01 PM Hubert Fonseca @.***> wrote:

Forgot to mention that I am using iterm 2, but the result is the same on the classical terminal

[image: image] https://user-images.githubusercontent.com/30186/184708741-c5215dc9-1f52-4b2e-9913-37b8edd25b89.png

— Reply to this email directly, view it on GitHub https://github.com/twolfson/sexy-bash-prompt/issues/95#issuecomment-1215730818, or unsubscribe https://github.com/notifications/unsubscribe-auth/AISPXO544RWIZPJYEEUWE3LVZKO3HANCNFSM56TKB4RA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

twolfson commented 2 years ago

@hubefonseca It's likely your default shell is zsh and not bash. You can confirm this via echo $SHELL

I've verified I get this behavior if I use zsh and source .bash_prompt in Docker sandbox:

image

You can change the iTerm shell via a profile with a custom shell for /bin/bash

https://stackoverflow.com/a/65041741/1960509

You could use a broader change like chsh but that feels riskier if there are system level scripts which assume zsh instead of bash.

If you start receiving a bash deprecation notice from macOS, this can be silenced via: export BASH_SILENCE_DEPRECATION_WARNING=1 in your .bash_profile

https://github.com/twolfson/dotfiles/blob/44965bfcff9bf982679f088cd76f1e87a65ab440/.bash_profile#L10-L11