Hi, Paul. On 26 Aug 2018, Paul Wise wrote: > >The completion for dpkg -L/--listfiles does not list held packages when >grep-status (from dctrl-tools) is installed. This is because the >grep-status _comp_dpkg_purgeable_packages cares about the dpkg package >selection states (install/hold/deinstall/purge) while the other version >only cares about the dpkg package states (installed/unpacked/etc). > >There is a similar issue for the _comp_dpkg_installed_packages >function. > >The fix for this is quite simple, just remove install/deinstall from >the arguments to the -FStatus options.
Ack. >$ diff -u /usr/share/bash-completion/completions/dpkg* >--- /usr/share/bash-completion/completions/dpkg 2018-03-31 >07:07:32.000000000 +0800 >+++ /usr/share/bash-completion/completions/dpkg.fixed >2018-08-26 12:02:49.488857999 +0800 @@ -3,7 +3,7 @@ > _have grep-status && { > _comp_dpkg_installed_packages() > { >- grep-status -P -e "^$1" -a -FStatus 'install ok installed' -n -s >Package >+ grep-status -P -e "^$1" -a -FStatus 'ok installed' -n -s Package > } > } || { > _comp_dpkg_installed_packages() >@@ -19,7 +19,7 @@ > _have grep-status && { > _comp_dpkg_purgeable_packages() > { >- grep-status -P -e "^$1" -a -FStatus 'install ok installed' -o >-FStatus 'deinstall ok config-files' -n -s Package >+ grep-status -P -e "^$1" -a -FStatus 'ok installed' -o -FStatus >'ok config-files' -n -s Package > } > } || { > _comp_dpkg_purgeable_packages() Thanks for writing the fix... I'll apply it to the package and forward this upstream.