From 286dc1eb3825c3fc383f0ce0b65235be7c03f259 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 10 Jul 2023 22:22:40 -0500 Subject: [PATCH] BSD --- common/fish/prompt.fish | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/fish/prompt.fish b/common/fish/prompt.fish index 1697b85..cf5c87d 100644 --- a/common/fish/prompt.fish +++ b/common/fish/prompt.fish @@ -1,7 +1,12 @@ set MAX_PATH_PIECE_CHARS 3 function get_hostname - has_command hostname && hostname --short || cat /etc/hostname + if test (uname) = Linux || test (uname) = Darwin + has_command hostname && hostname --short || cat /etc/hostname + else + # assume bsd + hostname | head -n 1 + end end function fish_greeting