Skip to content

Commit

Permalink
Darken Git prompt if unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
tfpf committed Nov 14, 2024
1 parent 422b904 commit 73b6dc9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom-prompt/custom-prompt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ namespace C
#define B_BLUE BEGIN_INVISIBLE ESCAPE LEFT_SQUARE_BRACKET "94m" END_INVISIBLE
#define B_GREEN BEGIN_INVISIBLE ESCAPE LEFT_SQUARE_BRACKET "92m" END_INVISIBLE
#define B_GREEN_RAW ESCAPE LEFT_SQUARE_BRACKET "92m"
#define B_GREY BEGIN_INVISIBLE ESCAPE LEFT_SQUARE_BRACKET "90m" END_INVISIBLE
#define B_GREY_RAW ESCAPE LEFT_SQUARE_BRACKET "90m"
#define B_RED BEGIN_INVISIBLE ESCAPE LEFT_SQUARE_BRACKET "91m" END_INVISIBLE
#define B_RED_RAW ESCAPE LEFT_SQUARE_BRACKET "91m"
Expand Down Expand Up @@ -710,7 +711,7 @@ int main_internal(int const argc, char const* argv[])
display_primary_prompt(shlvl,
git_repository_information_future.wait_for(std::chrono::milliseconds(150)) == std::future_status::ready
? git_repository_information_future.get()
: "unavailable");
: B_GREY "unavailable" RESET);

return EXIT_SUCCESS;
}
Expand Down

0 comments on commit 73b6dc9

Please sign in to comment.