Explorar o código

Merge pull request #1269 from 14mRh4X0r/set-nullglob-for-package-count

Set nullglob for package counting
black %!s(int64=6) %!d(string=hai) anos
pai
achega
5b8ca15f1e
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      neofetch

+ 2 - 0
neofetch

@@ -1343,6 +1343,7 @@ get_packages() {
             # $br_prefix is fixed and won't change based on user input so this is safe either way.
             # $br_prefix is fixed and won't change based on user input so this is safe either way.
             # shellcheck disable=SC2086
             # shellcheck disable=SC2086
             {
             {
+            shopt -s nullglob
             has "emerge"  && dir ${br_prefix}/var/db/pkg/*/*/
             has "emerge"  && dir ${br_prefix}/var/db/pkg/*/*/
             has "Compile" && dir ${br_prefix}/Programs/*/
             has "Compile" && dir ${br_prefix}/Programs/*/
             has "eopkg"   && dir ${br_prefix}/var/lib/eopkg/package/*
             has "eopkg"   && dir ${br_prefix}/var/lib/eopkg/package/*
@@ -1350,6 +1351,7 @@ get_packages() {
             has "pkgtool" && dir ${br_prefix}/var/log/packages/*
             has "pkgtool" && dir ${br_prefix}/var/log/packages/*
             has "cave"    && dir ${br_prefix}/var/db/paludis/repositories/cross-installed/*/data/*/ \
             has "cave"    && dir ${br_prefix}/var/db/paludis/repositories/cross-installed/*/data/*/ \
                                  ${br_prefix}/var/db/paludis/repositories/installed/data/*/
                                  ${br_prefix}/var/db/paludis/repositories/installed/data/*/
+            shopt -u nullglob
             }
             }
 
 
             # Other (Needs complex command)
             # Other (Needs complex command)