Merge pull request #943 from font/user_host_prompt

Add function for user@host in prompt
This commit is contained in:
Nils Winkler
2017-04-24 08:04:14 +02:00
committed by GitHub

View File

@@ -52,6 +52,10 @@ SCM_NONE_CHAR='○'
RVM_THEME_PROMPT_PREFIX=' |'
RVM_THEME_PROMPT_SUFFIX='|'
THEME_SHOW_USER_HOST=${THEME_SHOW_USER_HOST:=false}
USER_HOST_THEME_PROMPT_PREFIX=''
USER_HOST_THEME_PROMPT_SUFFIX=''
VIRTUALENV_THEME_PROMPT_PREFIX=' |'
VIRTUALENV_THEME_PROMPT_SUFFIX='|'
@@ -433,6 +437,12 @@ function clock_prompt {
fi
}
function user_host_prompt {
if [[ "${THEME_SHOW_USER_HOST}" = "true" ]]; then
echo -e "${USER_HOST_THEME_PROMPT_PREFIX}\u@\h${USER_HOST_THEME_PROMPT_SUFFIX}"
fi
}
# backwards-compatibility
function git_prompt_info {
git_prompt_vars