fixes bash prompt inside emacs

This commit is contained in:
Dennis Schoepf 2025-09-22 15:37:04 +02:00
parent 04d362f4ea
commit 2abce0e8eb

View file

@ -26,7 +26,6 @@
''; '';
bashrcExtra = '' bashrcExtra = ''
# FNM # FNM
eval "$(fnm env --use-on-cd --shell bash)" eval "$(fnm env --use-on-cd --shell bash)"
@ -34,12 +33,12 @@
if [[ "$INSIDE_EMACS" = 'vterm' ]] \ if [[ "$INSIDE_EMACS" = 'vterm' ]] \
&& [[ -n "$EMACS_VTERM_PATH" ]] \ && [[ -n "$EMACS_VTERM_PATH" ]] \
&& [[ -f "$EMACS_VTERM_PATH/etc/emacs-vterm-bash.sh" ]]; then && [[ -f "$EMACS_VTERM_PATH/etc/emacs-vterm-bash.sh" ]]; then
source "$EMACS_VTERM_PATH" source "$EMACS_VTERM_PATH/etc/emacs-vterm-bash.sh"
fi fi
''; '';
initExtra = '' initExtra = ''
if [ -n "$INSIDE_EMACS" ]; then if [ "$TERM" == "dumb" ]; then
PS1="[\u@\h:\w]\\$ " PS1="[\u@\h:\w]\\$ "
else else
source ~/.git-prompt.sh source ~/.git-prompt.sh