Fix networking in prompt

This commit is contained in:
Daniel Flanagan 2023-07-17 13:24:55 -05:00
parent 3af512f530
commit f2347bf291
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4

View file

@ -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