diff --git a/rootfs/home/developer/.bash_aliases b/rootfs/home/developer/.bash_aliases index 0a6da46..ca9e902 100644 --- a/rootfs/home/developer/.bash_aliases +++ b/rootfs/home/developer/.bash_aliases @@ -76,7 +76,10 @@ fi # ── Prompt: show [opencode-devbox] tag so it's obvious you're in the container # Preserves the default Debian PS1 logic but prefixes with a container marker. -if [ -n "${PS1:-}" ] && [ -z "${DEVBOX_PS1_SET:-}" ]; then +# We check for the literal '[devbox]' substring in PS1 rather than relying on +# an exported guard variable — otherwise `exec bash` inherits the guard but +# gets a fresh (prefix-less) PS1 from .bashrc, and the prefix would never be +# re-added in the new shell. +if [ -n "${PS1:-}" ] && [[ "$PS1" != *"[devbox]"* ]]; then PS1='\[\e[38;5;39m\][devbox]\[\e[0m\] '"${PS1}" - export DEVBOX_PS1_SET=1 fi