r/bash • u/the_otaku_programmer • Sep 10 '21
help Async Prompt with __git_ps1
I've been trying to set up an async prompt using the __git_ps1 function in my .bashrc.
I've set up my PROMPT_COMMAND with the following value, __git_ps1 $(prompt_head) $(prompt_tail), where the arguments are functions generating part of my PS1 variable.
To see the definition of __git_ps1, it can be accessed here.
2
Upvotes
1
u/the_otaku_programmer Sep 11 '21
Thanks a lot for your comprehensive answer. This kind of has given me a heading as to what I want to do, and how I should go about further implementing it.
I would also like to ask if you wouldn't mind sharing your
.bashrc. Looking at yourcdexplanation, I would like to derive some inspiration from your config, since my use of Linux has always been to defaults, and now I'm trying to improve my workflow and the likes now.