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