[F] Fix hostname compatibility
https://github.com/dylanaraps/neofetch/pull/2095 https://github.com/dylanaraps/neofetch/issues/2094
This commit is contained in:
parent
dce75a7d6d
commit
ccecf6424d
1 changed files with 4 additions and 1 deletions
5
neofetch
5
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}
|
||||
|
|
Loading…
Reference in a new issue