79351045

Date: 2025-01-13 02:14:09
Score: 2
Natty:
Report link

I had to use PROMPT_COMMAND, setting PROMPT_COMMAND to a function that changes PS1. And I had to use the condition git rev-parse --is-inside-work-tree > /dev/null 2>&1 to validate whether it is a git repository or not.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: MadSweeney