commit eb929ad41a915fdab68ff6bac2029b38b675cb48
parent 59eb42836441403aceab424c21bf6044a2b85728
Author: Kévin Le Gouguec <kevin.legouguec@gmail.com>
Date: Fri, 9 Oct 2026 21:31:37 +0200
Remove Git repo hints from PS1
I barely ever look at them.
Mostly prompted by some horror stories about getting pwn'd merely by
cd'ing in a Git directory. Admittedly most of these stories hinge on
exploring repos procured insecurely (e.g. unpacking a tarball) and
Properly Cloned Repos™ should not be susceptible to these hacks; I'm
fine removing the attack surface entirely tho.
Diffstat:
1 file changed, 0 insertions(+), 18 deletions(-)
diff --git a/.bash_prompt b/.bash_prompt
@@ -20,11 +20,6 @@ __show-hostname ()
esac
}
-__have-gitprompt ()
-{
- test -f /usr/lib/git-core/git-sh-prompt
-}
-
__set-title ()
{
local title=${USER}
@@ -151,11 +146,6 @@ __smart-term/set-ps1 ()
__fontify '\w' bold blue
- test "${PS1_SHOWGITSTATUS}" && {
- printf ' '
- __fontify "$(__git_ps1 '(%s)')" red
- }
-
printf '\\n'
__fontify '\$' dim
@@ -177,14 +167,6 @@ __smart-term/init ()
{
# Prompts.
- __have-gitprompt && {
- . /usr/lib/git-core/git-sh-prompt
- GIT_PS1_SHOWDIRTYSTATE=t
- GIT_PS1_SHOWUPSTREAM=auto
-
- PS1_SHOWGITSTATUS=t
- }
-
PROMPT_COMMAND=__smart-term/refresh
PS2=$(