From f2347bf2913a6f64895702849bd6895e371b03f6 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 17 Jul 2023 13:24:55 -0500 Subject: [PATCH] Fix networking in prompt --- common/fish/prompt.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/fish/prompt.fish b/common/fish/prompt.fish index cf5c87d..b577141 100644 --- a/common/fish/prompt.fish +++ b/common/fish/prompt.fish @@ -2,10 +2,10 @@ set MAX_PATH_PIECE_CHARS 3 function get_hostname if test (uname) = Linux || test (uname) = Darwin - has_command hostname && hostname --short || cat /etc/hostname + has_command hostname && hostname | cut -d. -f1 || cat /etc/hostname else # assume bsd - hostname | head -n 1 + hostname | head -n 1 | cut -d. -f1 end end