diff --git a/neofetch b/neofetch index 3c382581..50402371 100755 --- a/neofetch +++ b/neofetch @@ -54,7 +54,7 @@ get_distro() { case "$os" in "Linux" | "BSD" | "MINIX") - if [[ "$(< /proc/version)" == *"Microsoft"* || "$(< /proc/sys/kernel/osrelease)" == *"Microsoft"* ]]; then ## ERRORS NEED TO BE SUPPRESSED! + if [[ "$(< /proc/version)" == *"Microsoft"* || "$(< /proc/sys/kernel/osrelease)" == *"Microsoft"* ]]; then case "$distro_shorthand" in "on") distro="$(lsb_release -sir) [Windows 10]" ;; "tiny") distro="Windows 10" ;; @@ -109,11 +109,13 @@ get_distro() { esac # Workarounds for distros that go against the os-release standard. - [[ -z "${distro// }" ]] && distro="$(awk '/BLAG/ {print $1; exit}' /etc/*ease /usr/lib/*ease)" - [[ -z "${distro// }" ]] && distro="$(awk -F'=' '{print $2; exit}' /etc/*ease /usr/lib/*ease)" + [[ -z "${distro// }" ]] && distro="$(awk '/BLAG/ {print $1; exit}' /etc/os-release /usr/lib/os-release)" + [[ -z "${distro// }" ]] && distro="$(awk -F'=' '{print $2; exit}' /etc/os-release /usr/lib/os-release)" else - distro="$(cat /etc/*-release)" # UUOC, but using usual bash $(< *-file) returns "ambiguous redirect" + for release_file in /etc/*-release; do + distro+="$(< "$release_file")" + done if [[ -z "$distro" ]]; then case "$distro_shorthand" in "on" | "tiny") distro="$kernel_name" ;;