2 ms·
I suspect OP meant `PS1='\u@\h:\w\$(brname)\$ '` rather than `PS1="\u@\h:\w\$(brname)$ "`: - double quoting the command expansion would lead to `brname` being
by l0b0 6y ago
I suspect OP meant `PS1='\u@\h:\w\$(brname)\$ '` rather than `PS1="\u@\h:\w\$(brname)$ "`:
- double quoting the command expansion would lead to `brname` being executed once at shell startup (unless this assignment is happening in a `PROMPT_COMMAND` function or something[1]).
- A literal backslash before the dollar sign gives a "#" at the end of the prompt for root.
[1] https://gitlab.com/victor-engmark/tilde/-/blob/4dc4077a19250b93461521cf0830155467ec547f/.bashrc#L163 https://gitlab.com/victor-engmark/tilde/-/blob/4dc4077a19250...