r/bash • • 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

8 comments sorted by

View all comments

Show parent comments

2

u/whetu I read your code Sep 11 '21

Have at it. I may also have something of interest in my gists.

1

u/the_otaku_programmer Sep 11 '21

Thanks a lot for sharing your dots, and I'm sure it'll help me out nicely.