summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oh-my-zsh.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh
index 2e885219c..3e547d358 100644
--- a/oh-my-zsh.sh
+++ b/oh-my-zsh.sh
@@ -99,8 +99,8 @@ done
# Figure out the SHORT hostname
if [[ "$OSTYPE" = darwin* ]]; then
- # macOS's $HOST changes with dhcp, etc. Use ComputerName if possible.
- SHORT_HOST=$(scutil --get ComputerName 2>/dev/null) || SHORT_HOST="${HOST/.*/}"
+ # macOS's $HOST changes with dhcp, etc. Use LocalHostName if possible.
+ SHORT_HOST=$(scutil --get LocalHostName 2>/dev/null) || SHORT_HOST="${HOST/.*/}"
else
SHORT_HOST="${HOST/.*/}"
fi