Strip useless .local from prompt

This commit is contained in:
Loic Nageleisen 2020-12-23 16:33:00 +01:00
parent 2bd6ca065a
commit b1fe9096ec
2 changed files with 2 additions and 2 deletions

View file

@ -56,7 +56,7 @@ prompt_build_simple() {
__git_ps1_vars __git_ps1_vars
if [[ -n $SSH_CLIENT ]]; then if [[ -n $SSH_CLIENT ]]; then
echo -n "${HOSTNAME%%.local} " echo -n "${HOSTNAME%.local} "
fi fi
if [[ -n $STY ]]; then if [[ -n $STY ]]; then

View file

@ -132,7 +132,7 @@ set_prompt() {
local buffer="" local buffer=""
if [[ -n $SSH_CLIENT ]]; then if [[ -n $SSH_CLIENT ]]; then
buffer="${buffer}${HOST} " buffer="${buffer}${HOST%.local} "
fi fi
if [[ -n $STY ]]; then if [[ -n $STY ]]; then