Minor compat patch for MacOS systems
This commit is contained in:
parent
51bf4161b2
commit
330274bbc0
@ -264,7 +264,11 @@ _ps1bash() {
|
|||||||
# Add hostname prefix in SSH sessions
|
# Add hostname prefix in SSH sessions
|
||||||
unset _prefix
|
unset _prefix
|
||||||
# Get the system hostname
|
# Get the system hostname
|
||||||
_hostname="$(</etc/hostname)"
|
if [ -f /etc/hostname ]
|
||||||
|
_hostname="$(</etc/hostname)"
|
||||||
|
else
|
||||||
|
_hostname="$(hostname)"
|
||||||
|
fi
|
||||||
# Alert if in an SSH session
|
# Alert if in an SSH session
|
||||||
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
|
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
|
||||||
_prefix="${fg_bold}${fg_red}${_hostname}${r}${fg_red}:${r}${_prefix}"
|
_prefix="${fg_bold}${fg_red}${_hostname}${r}${fg_red}:${r}${_prefix}"
|
||||||
|
Loading…
Reference in New Issue
Block a user