From ac2f5393ff60aa466aae67425b289f4f926c6c73 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 26 Oct 2013 04:21:55 -0400 Subject: [PATCH] Truncate .local on mac SSH sessions --- zsh/prompt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zsh/prompt b/zsh/prompt index 9cf9c4f7..15bced7c 100644 --- a/zsh/prompt +++ b/zsh/prompt @@ -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