Adds SHORT_USER/HOSTNAME support to powerline themes

pull/1446/head
David Farrell 2019-11-01 23:16:39 -07:00
parent 6c64ba26f1
commit 55ce895141
No known key found for this signature in database
GPG Key ID: 1CCA28D0E300B56F
1 changed files with 4 additions and 3 deletions

View File

@ -30,10 +30,11 @@ function __powerline_user_info_prompt {
fi
;;
*)
local user=${SHORT_USER:-${USER}}
if [[ -n "${SSH_CLIENT}" ]] || [[ -n "${SSH_CONNECTION}" ]]; then
user_info="${USER_INFO_SSH_CHAR}${USER}"
user_info="${USER_INFO_SSH_CHAR}${user}"
else
user_info="${USER}"
user_info="${user}"
fi
;;
esac
@ -112,7 +113,7 @@ function __powerline_cwd_prompt {
}
function __powerline_hostname_prompt {
echo "$(hostname -s)|${HOST_THEME_PROMPT_COLOR}"
echo "${SHORT_HOSTNAME:-$(hostname -s)}|${HOST_THEME_PROMPT_COLOR}"
}
function __powerline_wd_prompt {