mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 16:41:41 +08: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
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user