Skip to content

Commit 985e590

Browse files
committed
Make the PROMPT_COMMAND chain with existing
If something else has already set the PROMPT_COMMAND (for example, ghostty or mise), currently the themes will clobber the existing value, breaking their functionality. This patch adds `;$PROMPT_COMMAND` to the end, so that bash will execute the existing commands as well.
1 parent 4a51027 commit 985e590

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

themes/default.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,4 +161,4 @@ fancygit_theme_builder() {
161161

162162
# Here's where the magic happens!
163163
# It calls our main function (fancygit_theme_builder) in order to mount a beautiful PS1 prompt =D
164-
PROMPT_COMMAND="fancygit_theme_builder"
164+
PROMPT_COMMAND="fancygit_theme_builder;$PROMPT_COMMAND"

themes/human.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,4 +145,4 @@ fancygit_theme_builder() {
145145

146146
# Here's where the magic happens!
147147
# It calls our main function (fancygit_theme_builder) in order to mount a beautiful PS1 prompt =D
148-
PROMPT_COMMAND="fancygit_theme_builder"
148+
PROMPT_COMMAND="fancygit_theme_builder;$PROMPT_COMMAND"

themes/simple.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,4 @@ __fancygit_theme_get_branch_area() {
117117

118118
# Here's where the magic happens!
119119
# It calls our main function (fancygit_theme_builder) in order to mount a beautiful PS1 prompt =D
120-
PROMPT_COMMAND="fancygit_theme_builder"
120+
PROMPT_COMMAND="fancygit_theme_builder;$PROMPT_COMMAND"

0 commit comments

Comments
 (0)