Compare commits
2 Commits
149c957d37
...
12b0ca4d52
| Author | SHA1 | Date | |
|---|---|---|---|
| 12b0ca4d52 | |||
| ae733d53b3 |
@@ -328,9 +328,15 @@ _ps1bash() {
|
|||||||
|
|
||||||
# Add hostname prefix in SSH sessions
|
# Add hostname prefix in SSH sessions
|
||||||
unset _prefix
|
unset _prefix
|
||||||
|
# Get the system hostname, using a util if one's available
|
||||||
|
if command -v hostname; then
|
||||||
|
_hostname="$(hostname -s)"
|
||||||
|
else
|
||||||
|
_hostname="$(</etc/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 -s)${r}${fg_red}:${r}${_prefix}"
|
_prefix="${fg_bold}${fg_red}${_hostname}${r}${fg_red}:${r}${_prefix}"
|
||||||
elif [ "$USER" != "salt" ]; then
|
elif [ "$USER" != "salt" ]; then
|
||||||
_prefix="${fg_bold}${fg_yellow}$USER${r}${fg_yellow}:${r}${_prefix}"
|
_prefix="${fg_bold}${fg_yellow}$USER${r}${fg_yellow}:${r}${_prefix}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Submodule base/.vim/bundle/ale updated: 5087246c82...607f33a1b0
Submodule base/.vim/bundle/lightline.vim updated: a29b8331e1...11931e2de4
Submodule base/.vim/bundle/vim-groovy updated: f9d16d5347...b78bbbbc2e
Reference in New Issue
Block a user