From e3afa265f97e10161ff379890b6f7f482978791e Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 2 Jun 2018 16:31:21 +1000 Subject: [PATCH] packages: only show manager when packages > 0 --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 7267ec65..12e35f18 100755 --- a/neofetch +++ b/neofetch @@ -1264,7 +1264,7 @@ get_uptime() { } get_packages() { - pkgs() { type -p "$1" >/dev/null && { ((packages+="$2")); managers+="$_, "; }; } + pkgs() { type -p "$1" >/dev/null && { ((packages+="$2"));(("$2">0))&&managers+="$_, "; }; } tots() { IFS=$'\n' read -d "" -ra files < <($1); echo "${#files[@]}"; } dirc() { echo $#; }