mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 12:21:19 -03:00
completions/dnf: Fix completions for DNF5 (#9862)
Since DNF5 there's no implicit \n in repoquery output. For DNF4 this change leaves blank lines in the output, but they are ignored anyway.
This commit is contained in:
committed by
Peter Ammon
parent
06105e9207
commit
ea2c53ca85
@@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
function __dnf_list_installed_packages
|
||||
dnf repoquery --cacheonly "$cur*" --qf "%{name}" --installed </dev/null
|
||||
dnf repoquery --cacheonly "$cur*" --qf "%{name}\n" --installed </dev/null
|
||||
end
|
||||
|
||||
function __dnf_list_available_packages
|
||||
@@ -26,7 +26,7 @@ function __dnf_list_available_packages
|
||||
else
|
||||
# In some cases dnf will ask for input (e.g. to accept gpg keys).
|
||||
# Connect it to /dev/null to try to stop it.
|
||||
set results (dnf repoquery --cacheonly "$tok*" --qf "%{name}" --available </dev/null 2>/dev/null)
|
||||
set results (dnf repoquery --cacheonly "$tok*" --qf "%{name}\n" --available </dev/null 2>/dev/null)
|
||||
end
|
||||
if set -q results[1]
|
||||
set results (string match -r -- '.*\\.rpm$' $files) $results
|
||||
|
||||
Reference in New Issue
Block a user