From ccecf6424db57e131146afc969f6ebcd7587735b Mon Sep 17 00:00:00 2001 From: "Azalea (on HyDEV-Daisy)" Date: Sat, 13 Aug 2022 11:24:37 -0400 Subject: [PATCH] [F] Fix hostname compatibility https://github.com/dylanaraps/neofetch/pull/2095 https://github.com/dylanaraps/neofetch/issues/2094 --- neofetch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 18fe17b2..9eb6e6fc 100755 --- a/neofetch +++ b/neofetch @@ -1604,7 +1604,10 @@ get_title() { case $title_fqdn in on) hostname=$(hostname -f) ;; - *) hostname=$(hostname | cut -d. -f1);; + *) + hostname=${HOSTNAME:-$(hostname)} + hostname=${hostname%.*} + ;; esac title=${title_color}${bold}${user}${at_color}@${title_color}${bold}${hostname}