This patch changes the prompt format for displaying the current chroot
name as well: (<name>) -> [<name>]
}
# Shell prompt
-prefix="${chroot_name:+($chroot_name)}"
[ "$UID" -eq 0 ] \
- && PS1="${prefix}\h:\w \\\$ " \
- || PS1="${prefix}\u@\h:\w \\\$ "
+ && PS1="\h:\w \\\$ " \
+ || PS1="\u@\h:\w \\\$ "
+if [ "\$(type -t __git_ps1)" ]; then
+ PS1="\$(__git_ps1 '(%s) ')$PS1"
+fi
+PS1="${chroot_name:+[$chroot_name] }$PS1"
# Enable bash completion, if available
[ -z "$BASH_COMPLETION" -a -r /etc/bash_completion ] \