pfetch: fix variable conflict

This commit is contained in:
Dylan Araps 2019-09-27 10:31:41 +03:00
parent cdcc395daf
commit 9f08795a37

9
pfetch
View File

@ -110,9 +110,9 @@ get_title() {
# the intention for using it is allowing the user to overwrite the
# value on invocation.
# shellcheck disable=SC2039
host=${HOSTNAME:-${hostname:-$(hostname)}}
hostname=${HOSTNAME:-${hostname:-$(hostname)}}
log "[3${PF_COL3:-1}m${user}${c7}@[3${PF_COL3:-1}m${host}" " " >&6
log "[3${PF_COL3:-1}m${user}${c7}@[3${PF_COL3:-1}m${hostname}" " " >&6
}
get_os() {
@ -269,11 +269,6 @@ get_host() {
*BSD*)
host=$(sysctl -n hw.vendor hw.product)
;;
Haiku)
# There is no way to get host information on Haiku(?).
return
;;
esac
# Turn the host string into an argument list so we can iterate