mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
profile: replace default bash prompt with more informative one
The default bash PS1 provides mostly no information. Let's replace it. Before: ``` [watanabe@thinkpad-x280:~] $ run0 🦸 bash-5.2# echo $PS1 🦸 \s-\v\$ ``` After: ``` [watanabe@thinkpad-x280:~] $ run0 🦸 [root@thinkpad-x280 watanabe]# echo $PS1 🦸 [\u@\h \W]\$ ``` Fixes #38494.
This commit is contained in:
committed by
Luca Boccassi
parent
ea2beb6591
commit
0dc0bf4caf
@@ -13,10 +13,16 @@
|
||||
# are propagated into these environment variables by pam_systemd(8).
|
||||
|
||||
if [ -n "${SHELL_PROMPT_PREFIX-}" ]; then
|
||||
if [ -n "${BASH_VERSION-}" ] && [ "$PS1" = "\\s-\\v\\\$ " ]; then
|
||||
PS1="[\u@\h \W]\\$ "
|
||||
fi
|
||||
PS1="$SHELL_PROMPT_PREFIX$PS1"
|
||||
fi
|
||||
|
||||
if [ -n "${SHELL_PROMPT_SUFFIX-}" ]; then
|
||||
if [ -n "${BASH_VERSION-}" ] && [ "$PS1" = "\\s-\\v\\\$ " ]; then
|
||||
PS1="[\u@\h \W]\\$ "
|
||||
fi
|
||||
PS1="$PS1$SHELL_PROMPT_SUFFIX"
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user