neofetch
neofetch copied to clipboard
Fix hostname detection for obscuring FQDN.
Description
POSIX or not, the current FQDN detection doesn't work on modern Linux systems. This fixes it as tested on FC35.
Features
Stops leaking my hostname information.
Issues
resolves https://github.com/dylanaraps/neofetch/issues/2094
Thank you for your contribution!
This PR is merged into hyfetch since this repo (dylanaraps/neofetch) seems no longer maintained.
HyFetch is a fork of neofetch with LGBTQ pride flags, but the repo also maintains an updated version of the original neofetch, addressing many pull requests that are not merged in the original repo.
Read the "Running Updated Original Neofetch" section for more info!
Just realized a problem... not all linux distros come with the inetutils that provides the hostname command. Maybe we should fall back to using $HOSTNAME if hostname command is not found.
I changed it so that it's compatible with systems without the hostname command. I also replaced cut with parameter expansion