mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 20:33:08 +00:00
[debian] Exclude packages with dpkg state 'deinstall' from installed list
When listing packages already installed (e.g. for use with `apt remove ...`), do not consider packages return by `dpkg --get-selections` with state 'deinstall'. Previously the `string replace` pattern was matching both 'install' and 'deinstall' packages.
This commit is contained in:
parent
32ca6118a6
commit
1ca58984bf
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ function __fish_print_packages
|
||||||
|
|
||||||
if type -q -f apt-cache
|
if type -q -f apt-cache
|
||||||
if set -q only_installed
|
if set -q only_installed
|
||||||
dpkg --get-selections | string replace -r '(\S+).*' "\$1\t$package"
|
dpkg --get-selections | string replace -fr '(\S+)\s+install' "\$1\t$package"
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
# Do not generate the cache as apparently sometimes this is slow.
|
# Do not generate the cache as apparently sometimes this is slow.
|
||||||
|
|
Loading…
Reference in a new issue