Add prefix to rbash shells
TODO: Make that more robust. One can make a shell restricted in more ways than just calling via rbash
This commit is contained in:
parent
65d45b44ec
commit
7b6710824f
7
.profile
7
.profile
@ -103,12 +103,15 @@ _ps1() {
|
||||
|
||||
# Add hostname prefix in SSH sessions
|
||||
if [ "$SSH_CLIENT" ]; then
|
||||
# Also add the machine's hostname
|
||||
prefix="${fg_bold}${fg_red}`hostname`${r}${fg_red}:"
|
||||
fi
|
||||
# Append a "restricted" prefix in rbash
|
||||
if [ "$0" == "rbash" ]; then
|
||||
prefix="${fg_bold}${fg_grey}rbash${r}:"
|
||||
fi
|
||||
# Change PWD color depending on the shell
|
||||
case $0 in
|
||||
bash)
|
||||
*bash)
|
||||
prefix="${prefix}${fg_yellow}"
|
||||
;;
|
||||
ksh)
|
||||
|
Loading…
Reference in New Issue
Block a user