The default .bashrc
file for Debian-based systems sets $PS1
like this:
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
What confuses me is that ${debian_chroot}
part. According to StackOverflow: Difference between single and double quotes in bash, if single-quotes are used when defining a string, characters such as $
should be treated as a literal, rather than evaluate variables.
Doesn't this mean that Bash should actually print out ${debian_chroot:...
, and not the value of that variable? Or are there more syntax rules involved here?