bash-git-prompt icon indicating copy to clipboard operation
bash-git-prompt copied to clipboard

Resetting PROMPT_START/PROMPT_END on exit

Open bradmwilliams opened this issue 1 year ago • 10 comments

/fixes #539

The issue seems to be caused by the logic here: https://github.com/magicmonty/bash-git-prompt/blob/51080c22b2cebb63111379f4eacd22cda199684b/gitprompt.sh#L249-L272

Basically, the values of both PROMPT_START and PROMPT_END are being set accordingly when entering a git repository, but never being reset to their original values upon exiting.

This PR adds a couple lines to capture the original values of PROMPT_START and PROMPT_END on the way in and then resets the values accordingly on the way out.

bradmwilliams avatar Feb 12 '24 14:02 bradmwilliams

Similar findings to #542.

bradmwilliams avatar Feb 12 '24 14:02 bradmwilliams

Tested on F-39 and it works as expected.

praveenkumar avatar Feb 28 '24 10:02 praveenkumar

This is also working for me. I hope this gets merged soon, as it is better than #542, since it handles both start AND end.

Dylan-M avatar Mar 22 '24 02:03 Dylan-M

Hello. This is working for me. Hope it will be merged.

GaLaKtIkUs avatar Apr 25 '24 14:04 GaLaKtIkUs

/fixes #548 /fixes #550

bradmwilliams avatar Apr 25 '24 16:04 bradmwilliams

It worked for me also, tested on Fedora 39

msantacruzd avatar May 15 '24 17:05 msantacruzd

Yeah, at this point the fix has been verified. We just need it to actually get merged by @magicmonty ;)

Hopefully soon, but in the meantime I just keep manually applying the fix as needed on my systems.

Dylan-M avatar May 15 '24 17:05 Dylan-M

I can confirm this worked for me on Fedora 40.

ghjm avatar May 18 '24 03:05 ghjm

I can also confirm this works for me on Fedora 40

ddreggors avatar Jun 03 '24 12:06 ddreggors

Works for me too on Fedora 40

joelapatatechaude avatar Jun 23 '24 01:06 joelapatatechaude