From: Ian Kelling Date: Wed, 15 Dec 2021 19:34:31 +0000 (-0500) Subject: fix pfile X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=5811d8d38638af3d6f06437cdb66111abe106778;p=distro-functions fix pfile --- diff --git a/src/package-manager-abstractions b/src/package-manager-abstractions index 0bd5389..e56ec48 100644 --- a/src/package-manager-abstractions +++ b/src/package-manager-abstractions @@ -201,9 +201,9 @@ EOF } pfile() { # -a = search all repos - local arg + local -a arg if [[ $1 != -a ]]; then - arg="--filter-origins $(positive-origins)" + arg=(--filter-origins "$(positive-origins)") fi local file=$1 # ucfq can tell us about config files which are not tracked @@ -218,9 +218,9 @@ EOF if [[ $file == /* ]]; then dpkg -S "$file" elif [[ $file == */* ]]; then - apt-file $arg find -x "$file"\$ + apt-file "${arg[@]}" find -x "$file"\$ else - apt-file $arg find -x /"$file"\$ + apt-file "${arg[@]}" find -x /"$file"\$ update-alternatives --list "$file" 2>/dev/null fi }