diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2019-09-24 18:25:49 +0300 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2019-09-24 18:25:49 +0300 |
| commit | 853ca40ccc5aefe33cbca9dfafa3556004ed29b2 (patch) | |
| tree | 04e12b5a6c29b50ecd1d75081cdc426321578664 | |
| parent | 06c73f39775e2d1f86cdf2b4f24a6c4e2c81cc2e (diff) | |
| download | pfetch-853ca40ccc5aefe33cbca9dfafa3556004ed29b2.tar.gz | |
pfetch: clean up
| -rwxr-xr-x | pfetch | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -88,14 +88,17 @@ log() { get_title() { # Username is retrieved by first checking '$USER' with a fallback # to the 'whoami' command. - # + user=${USER:-$(whoami)} + # Hostname is retrieved by first checking '$HOSTNAME' with a fallback # to the 'hostname' command. # # Disable the warning about '$HOSTNAME' being undefined in POSIX sh as # it is intended for allowing the user to overwrite the value on invocation. # shellcheck disable=SC2039 - log "$c4${USER:-$(whoami)}$c7@$c4${HOSTNAME:-${hostname:-$(hostname)}}" + host=${HOSTNAME:-${hostname:-$(hostname)}} + + log "${c4}${user}${c7}@${host}${c4}" } get_distro() { |
