packages: only show manager when packages > 0

This commit is contained in:
Dylan Araps 2018-06-02 16:31:21 +10:00
parent 094fca97bf
commit e3afa265f9
1 changed files with 1 additions and 1 deletions

View File

@ -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 $#; }