Truncate .local on mac SSH sessions

This commit is contained in:
Henrik Lissner 2013-10-26 04:21:55 -04:00
parent b4ec38440f
commit ac2f5393ff

View file

@ -51,7 +51,11 @@ function lprompt {
# Show the hostname if this is an SSH session
if [[ -n $SSH_CLIENT ]]; then
echo -n "%{$fg[blue]%}"
echo -n " $(hostname)"
if is_mac; then
echo -n " $(hostname | sed -e 's/\.local$//')"
else
echo -n " $(hostname)"
fi
fi
# The prompt