Skip to content

Fix: Disappearing starship prompt when reloading ~/.bashrc with both/either ble.sh and/or bash-preexec.sh #6723

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

excited-bore
Copy link

@excited-bore excited-bore commented May 4, 2025

Description

There was a huge unnecessary if/else in starship.bash that only allowed one of either:

  1. To have preexec/precmd functions to be hooked into ble.sh
  2. To have preexec/precmd functions to be hooked into bash-preexec.sh
  3. To properly reset the prompt upon reloading

This also fixes a bug where it checks whether starship preexec and precmd functions aren't already part of the bash-preexec functions in favour of constantly re-adding them after every reload

Motivation and Context

Closes #6702

How Has This Been Tested?

I made a file with the contents of starship.bash which I tested on default manjaro ~/.bashrc config.
I tested:

  • bash-preexec.sh (latest version) - with first sourcing bash-preexec.sh and then sourcing starship.bash in ~/.bashrc

  • ble.sh (git version from AUR - latest version) - no change to config, ble.sh related lines at top and bottom of ~/.bashrc

  • both bash-preexec.sh and ble.sh

  • I have tested using MacOS

  • I have tested using Linux

  • I have tested using Windows

Checklist:

  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.

…either ble.sh and/or bash-preexec.sh are loaded

There was a huge unnecessary `if/else` that only allowed:
1) To have preexec/precmd functions to be hooked into ble.sh
2) To have preexec/precmd functions to be hooked into bash-preexec.sh
3) To properly reset the prompt upon reloading

This also fixes a bug where it checks whether starship preexec and precmd functions aren't already part of the bash-preexec functions in favour of constantly re-adding them after every reload
@excited-bore
Copy link
Author

excited-bore commented May 22, 2025

Don't know what to do to have this patch merged? Is the config schema not being up-to-date that downright unacceptable? I don't even understand what that means / why it's of this much relevance...
This pull request has been stalled for like 3 weeks now with no reaction whatsoever...

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

Successfully merging this pull request may close these issues.

Unable to resource ~/.bashrc using ~/.bash_preexec.sh with manjaro .bashrc
1 participant