summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zshrc2
1 files changed, 1 insertions, 1 deletions
diff --git a/zshrc b/zshrc
index 618451f..3373e51 100644
--- a/zshrc
+++ b/zshrc
@@ -34,7 +34,7 @@ USER=${USER:-`whoami`}
UID=${UID:-`id -u`}
HOST=$HOST:r
HOST=${HOST:-$(hostname -s)}
-DOMAIN=${DOMAIN:-$(hostname -a | sed 's/^[^\.]*\.\?//')}
+DOMAIN=${DOMAIN:-$(hostname -a 2>&-| sed 's/^[^\.]*\.\?//')}
DOMAIN=${DOMAIN:-$(hostname -d 2>&-)}
DOMAIN=${DOMAIN:-$(hostname -y 2>&-)}
[ "$DOMAIN" = "" -o "$DOMAIN" = "localdomain" -o "$DOMAIN" = "(none)" ] && DOMAIN=$(grep "^search " /etc/resolv.conf | cut -d' ' -f2)