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