use $SHORT_HOSTNAME if set

change `${HOSTNAME}` to `${SHORT_HOSTNAME:=$HOSTNAME}`
pull/1091/head
KeLiu 2017-11-17 17:07:43 +08:00 committed by GitHub
parent 4743fc5b4b
commit e325859afb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ function __powerline_user_info_prompt {
;;
*)
if [[ -n "${SSH_CLIENT}" ]]; then
user_info="${USER_INFO_SSH_CHAR}${USER}@${HOSTNAME}"
user_info="${USER_INFO_SSH_CHAR}${USER}@${SHORT_HOSTNAME:=$HOSTNAME}"
else
user_info="${USER}"
fi