Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a499254

Browse files
authored
REALUSER added
1 parent 34e1170 commit a499254

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎bashrc/README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ __prompt_command() {
5757

5858
# https://stackoverflow.com/questions/18215973/how-to-check-if-running-as-root-in-a-bash-script
5959
if [ "${EUID:-$(id -u)}" -eq 0 ]; then
60-
PS1+="${Red}\u" #user
60+
REALUSER=$(who -m | cut -f1 -d' ')
61+
PS1+="${Gray}${REALUSER}->${Red}\u" #user
6162
else
6263
PS1+="${Yellow}\u" #user
6364
fi

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /