mirror of
https://github.com/dylanaraps/pfetch.git
synced 2026-10-24 12:04:34 +00:00
pfetch: clean up
This commit is contained in:
1 parent
06c73f3977
commit
853ca40ccc
1 file changed
+5
-2
@@ -88,14 +88,17 @@ log() {
|
|||||||
get_title() {
|
get_title() {
|
||||||
# Username is retrieved by first checking '$USER' with a fallback
|
# Username is retrieved by first checking '$USER' with a fallback
|
||||||
# to the 'whoami' command.
|
# to the 'whoami' command.
|
||||||
#
|
user=${USER:-$(whoami)}
|
||||||
|
|
||||||
# Hostname is retrieved by first checking '$HOSTNAME' with a fallback
|
# Hostname is retrieved by first checking '$HOSTNAME' with a fallback
|
||||||
# to the 'hostname' command.
|
# to the 'hostname' command.
|
||||||
#
|
#
|
||||||
# Disable the warning about '$HOSTNAME' being undefined in POSIX sh as
|
# Disable the warning about '$HOSTNAME' being undefined in POSIX sh as
|
||||||
# it is intended for allowing the user to overwrite the value on invocation.
|
# it is intended for allowing the user to overwrite the value on invocation.
|
||||||
# shellcheck disable=SC2039
|
# shellcheck disable=SC2039
|
||||||
log "$c4${USER:-$(whoami)}$c7@$c4${HOSTNAME:-${hostname:-$(hostname)}}"
|
host=${HOSTNAME:-${hostname:-$(hostname)}}
|
||||||
|
|
||||||
|
log "${c4}${user}${c7}@${host}${c4}"
|
||||||
}
|
}
|
||||||
|
|
||||||
get_distro() {
|
get_distro() {
|
||||||
|
|||||||
Reference in new issue
Block a user