mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 05:43:11 +00:00
completions/dnf: Only offer the packagename
Removing the extraneous cruft. Really, this should just be using its database properly. Fixes #7118.
This commit is contained in:
parent
197d615cc8
commit
d8e5dfbb51
1 changed files with 6 additions and 2 deletions
|
@ -8,7 +8,11 @@ end
|
|||
|
||||
function __dnf_list_available_packages
|
||||
if type -q sqlite3
|
||||
sqlite3 /var/cache/dnf/packages.db "SELECT pkg FROM available WHERE pkg LIKE \"$cur%\"" 2>/dev/null
|
||||
# This schema is bad, there is only a "pkg" field with the full
|
||||
# packagename-version-release.fedorarelease.architecture
|
||||
# tuple. We are only interested in the packagename.
|
||||
sqlite3 /var/cache/dnf/packages.db "SELECT pkg FROM available WHERE pkg LIKE \"$cur%\"" 2>/dev/null |
|
||||
string replace -r -- '-[^-]*-[^-]*$' ''
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -305,4 +309,4 @@ complete -c dnf -n __fish_no_arguments -l skip-broken -d "Skips broken packages"
|
|||
complete -c dnf -n __fish_no_arguments -l showduplicates -d "Shows duplicate packages"
|
||||
complete -c dnf -n __fish_no_arguments -s v -l verbose -d "Verbose mode"
|
||||
complete -c dnf -n __fish_no_arguments -l version -d "Shows DNF version and exit"
|
||||
complete -c dnf -n __fish_no_arguments -s y -l assumeyes -d "Answer yes for all questions"
|
||||
complete -c dnf -n __fish_no_arguments -s y -l assumeyes -d "Answer yes for all questions"
|
||||
|
|
Loading…
Reference in a new issue