updates bash prompt

This commit is contained in:
Dennis Schoepf 2025-09-21 21:22:02 +02:00
parent 34e0823c04
commit 3a674fad8d

View file

@ -5,6 +5,7 @@
sessionVariables = {
GPG_TTY = "$(tty)";
PROMPT_DIRTRIM = "3";
};
shellAliases = {
@ -33,5 +34,13 @@
source "$EMACS_VTERM_PATH"
fi
'';
initExtra = ''
if [ -n "$INSIDE_EMACS" ]; then
PS1="[\u@\h:\w]\\$ "
else
PROMPT_COMMAND="PS1_CMD1=$(git branch --show-current 2>/dev/null)'; PS1='\u@\h \[\e[96m\]\w\[\e[0m\] (\[\e[95m\]$PS1_CMD1\[\e[0m\])\n\[\e[96m\]λ\[\e[0m\] "
fi
'';
};
}