fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
cab89b5df
master
1# 2# Completions for the dnf command 3# 4 5function __fish_dnf_is_dnf5 6path resolve --$PATH /dnf| path filter| string match -q --'*/dnf5' 7end 8 9function __fish_dnf_list_installed_packages 10dnf repoquery --cacheonly" $cur *" --qf"%{name}\n" --installed< /dev/null 11end 12 13function __fish_dnf_list_copr_repos 14set -l copr_repos( dnf copr list) 15 16switch $argv [ 1 ] 17case enable 18string replace -f --" (disabled)" "" $copr_repos 19case disable 20string match -v --"*(disabled)*" $copr_repos 21case '*' 22string replace --" (disabled)" "" $copr_repos 23end 24end 25 26function __fish_dnf_list_available_packages 27set -l tok( commandline -ct| string collect) 28set -l files( __fish_complete_suffix .rpm) 29if string match -q --'*/*' $tok 30# Fast path - package names can't contain slashes, so show files. 31string join --\n $files 32return 33end 34set -l results 35if __fish_dnf_is_dnf5 36# dnf5 provides faster completions than repoquery, but does not maintain the 37# same sqlite db as dnf4 38set results( dnf --complete=2 dnf install" $tok *" ) 39else if type -q sqlite3 40# dnf --cacheonly list --available gives a list of non-installed packages dnf is aware of, 41# but it is slow as molasses. Unfortunately, sqlite3 is not available oob (Fedora Server 32). 42 43# This schema is bad, there is only a "pkg" field with the full 44# packagename-version-release.fedorarelease.architecture 45# tuple. We are only interested in the packagename. 46set results( sqlite3 /var/cache/dnf/packages.db"SELECT pkg FROM available WHERE pkg LIKE ' $tok %'" 2> /dev/null| 47string replace -r --'-[^-]*-[^-]*$' '' ) 48else 49# In some cases dnf will ask for input (e.g. to accept gpg keys). 50# Connect it to /dev/null to try to stop it. 51set results( dnf repoquery --cacheonly" $tok *" --qf"%{name}\n" --available< /dev/null2> /dev/null) 52end 53if set -q results[ 1 ] 54set results( string match -r --'.*\\.rpm$' $files ) $results 55else 56set results$files 57end 58string join\n $results 59end 60 61function __fish_dnf_list_transactions 62if not __fish_dnf_is_dnf5 && type -q sqlite3 63sqlite3 /var/lib/dnf/history.sqlite"SELECT id, cmdline FROM trans" 2> /dev/null| string replace"|" \t 64end 65end 66 67# DNF subcommand aliases 68set -l dnf_install_cmds install in 69set -l dnf_remove_cmds remove rm 70set -l dnf_reinstall_cmds reinstall rei 71set -l dnf_info_cmds info if 72set -l dnf_upgrade_cmds upgrade up 73 74# Alias 75complete -c dnf -n __fish_use_subcommand -xa alias -d"Manage aliases" 76complete -c dnf -n"__fish_seen_subcommand_from alias" -xa add -d"Add a new alias" 77complete -c dnf -n"__fish_seen_subcommand_from alias" -xa list -d"Lists all defined aliases" 78complete -c dnf -n"__fish_seen_subcommand_from alias" -xa delete -d"Delete an alias" 79 80# Autoremove 81complete -c dnf -n __fish_use_subcommand -xa autoremove -d"Removes unneeded packages" 82complete -c dnf -n"__fish_seen_subcommand_from autoremove" -xa"(__fish_dnf_list_installed_packages)" 83 84# Check 85complete -c dnf -n __fish_use_subcommand -xa check -d"Check for problems in packagedb" 86complete -c dnf -n"__fish_seen_subcommand_from check" -l dependencies -d"Checks dependencies" 87complete -c dnf -n"__fish_seen_subcommand_from check" -l duplicates -d"Checks duplicates" 88complete -c dnf -n"__fish_seen_subcommand_from check" -l obsoleted -d"Checks obsoleted" 89complete -c dnf -n"__fish_seen_subcommand_from check" -l provides -d"Checks provides" 90 91# Check-Update 92complete -c dnf -n __fish_use_subcommand -xa check-update -d"Checks for updates" 93complete -c dnf -n"__fish_seen_subcommand_from check-update" -l changelogs 94 95# Clean 96complete -c dnf -n __fish_use_subcommand -xa clean -d"Clean up cache directory" 97complete -c dnf -n"__fish_seen_subcommand_from clean" -xa dbcache -d"Removes the database cache" 98complete -c dnf -n"__fish_seen_subcommand_from clean" -xa expire-cache -d"Marks the repository metadata expired" 99complete -c dnf -n"__fish_seen_subcommand_from clean" -xa metadata -d"Removes repository metadata" 100complete -c dnf -n"__fish_seen_subcommand_from clean" -xa packages -d"Removes any cached packages" 101complete -c dnf -n"__fish_seen_subcommand_from clean" -xa all -d"Removes all cache" 102 103# Copr 104set -l coprcommands list enable disable remove debug 105complete -c dnf -n __fish_use_subcommand -xa copr -d"Manage Copr repositories" 106complete -c dnf -n"__fish_seen_subcommand_from copr; and not __fish_seen_subcommand_from $coprcommands " -xa list -d"List Copr repositories" 107complete -c dnf -n"__fish_seen_subcommand_from copr; and not __fish_seen_subcommand_from $coprcommands " -xa enable -d"Install a Copr repository" 108complete -c dnf -n"__fish_seen_subcommand_from copr; and not __fish_seen_subcommand_from $coprcommands " -xa disable -d"Disable a Copr repository" 109complete -c dnf -n"__fish_seen_subcommand_from copr; and not __fish_seen_subcommand_from $coprcommands " -xa remove -d"Remove a Copr repository" 110complete -c dnf -n"__fish_seen_subcommand_from copr; and not __fish_seen_subcommand_from $coprcommands " -xa debug -d"Print system info for debugging" 111complete -c dnf -n"__fish_seen_subcommand_from copr; and not __fish_seen_subcommand_from $coprcommands " -l hub -d"Copr hub hostname" 112 113for iin enable disable remove 114complete -c dnf -n"__fish_seen_subcommand_from copr; and __fish_seen_subcommand_from $i " -xa"(__fish_dnf_list_copr_repos $i )" 115end 116 117# Distro-sync 118complete -c dnf -n __fish_use_subcommand -xa distro-sync -d"Synchronizes packages to match the latest" 119 120# Downgrade 121complete -c dnf -n __fish_use_subcommand -xa downgrade -d"Downgrades the specified package" 122complete -c dnf -n"__fish_seen_subcommand_from downgrade" -xa"(__fish_dnf_list_installed_packages)" 123 124# Group 125complete -c dnf -n __fish_use_subcommand -xa group -d"Manage groups" 126 127complete -c dnf -n"__fish_seen_subcommand_from group; and not __fish_seen_subcommand_from mark" -xa summary -d"Display overview of installed and available groups" 128complete -c dnf -n"__fish_seen_subcommand_from group; and not __fish_seen_subcommand_from mark" -xa info -d"Display package list of a group" 129# Group install 130complete -c dnf -n"__fish_seen_subcommand_from group; and not __fish_seen_subcommand_from mark" -xa install -d"Install group" 131complete -c dnf -n"__fish_seen_subcommand_from group; and __fish_seen_subcommand_from install" -l with-optional -d"Include optional packages" 132# Group list 133complete -c dnf -n"__fish_seen_subcommand_from group; and not __fish_seen_subcommand_from mark" -xa list -d"List groups" 134complete -c dnf -n"__fish_seen_subcommand_from group; and __fish_seen_subcommand_from list" -l installed -d"List installed groups" 135complete -c dnf -n"__fish_seen_subcommand_from group; and __fish_seen_subcommand_from list" -l available -d"List available groups" 136complete -c dnf -n"__fish_seen_subcommand_from group; and __fish_seen_subcommand_from list" -l hidden -d"List hidden groups" 137# Group remove 138complete -c dnf -n"__fish_seen_subcommand_from group; and not __fish_seen_subcommand_from mark" -xa remove -d"Remove group" 139complete -c dnf -n"__fish_seen_subcommand_from group; and __fish_seen_subcommand_from remove" -l with-optional -d"Include optional packages" 140 141complete -c dnf -n"__fish_seen_subcommand_from group; and not __fish_seen_subcommand_from mark" -xa upgrade -d"Upgrade group" 142# Group mark 143complete -c dnf -n"__fish_seen_subcommand_from group; and not __fish_seen_subcommand_from mark" -xa mark -d"Marks group without manipulating packages" 144complete -c dnf -n"__fish_seen_subcommand_from group; and __fish_seen_subcommand_from mark" -xa install -d"Mark group installed without installing packages" 145complete -c dnf -n"__fish_seen_subcommand_from group; and __fish_seen_subcommand_from mark" -xa remove -d"Mark group removed without removing packages" 146 147# Help 148complete -c dnf -n __fish_use_subcommand -xa help -d"Display help and exit" 149 150# History 151complete -c dnf -n __fish_use_subcommand -xa history -d"View and manage past transactions" 152complete -c dnf -n"__fish_seen_subcommand_from history" -xa list -d"Lists all transactions" 153complete -c dnf -n"__fish_seen_subcommand_from history" -xa info -d"Describe the given transactions" 154complete -c dnf -n"__fish_seen_subcommand_from history" -xa redo -d"Redoes the specified transaction" 155complete -c dnf -n"__fish_seen_subcommand_from history" -xa rollback -d"Undo all transactions performed after the specified transaction" 156complete -c dnf -n"__fish_seen_subcommand_from history" -xa undo -d"Undoes the specified transaction" 157complete -c dnf -n"__fish_seen_subcommand_from history" -xa userinstalled -d"Lists all user installed packages" 158 159for iin info redo rollback undo 160complete -c dnf -n"__fish_seen_subcommand_from history; and __fish_seen_subcommand_from $i " -xa"(__fish_dnf_list_transactions)" 161end 162 163# Info 164complete -c dnf -n __fish_use_subcommand -xa" $dnf_info_cmds " -d"Describes the given package" 165complete -c dnf -n"__fish_seen_subcommand_from $dnf_info_cmds ; and not __fish_seen_subcommand_from history" \ 166 -k -xa"(__fish_dnf_list_available_packages)" 167 168# Install 169complete -c dnf -n __fish_use_subcommand -xa" $dnf_install_cmds " -d"Install package" 170complete -c dnf -n"__fish_seen_subcommand_from $dnf_install_cmds " \ 171 -k -xa"(__fish_dnf_list_available_packages)" 172 173# List 174complete -c dnf -n __fish_use_subcommand -xa list -d"Lists all packages" 175complete -c dnf -n"__fish_seen_subcommand_from list" -l all -d"Lists all packages" 176complete -c dnf -n"__fish_seen_subcommand_from list" -l installed -d"Lists installed packages" 177complete -c dnf -n"__fish_seen_subcommand_from list" -l available -d"Lists available packages" 178complete -c dnf -n"__fish_seen_subcommand_from list" -l extras -d"Lists installed packages that are not in any known repository" 179complete -c dnf -n"__fish_seen_subcommand_from list" -l obsoletes -d"List installed obsoleted packages" 180complete -c dnf -n"__fish_seen_subcommand_from list" -l recent -d"List recently added packages" 181complete -c dnf -n"__fish_seen_subcommand_from list" -l upgrades -d"List available upgrades" 182complete -c dnf -n"__fish_seen_subcommand_from list" -l autoremove -d"List packages which will be removed by autoremove" 183 184# Makecache 185complete -c dnf -n __fish_use_subcommand -xa makecache -d"Downloads and caches metadata for all known repos" 186complete -c dnf -n"__fish_seen_subcommand_from makecache" -l timer -d"Instructs DNF to be more resource-aware" 187 188# Mark 189complete -c dnf -n __fish_use_subcommand -xa mark -d"Mark packages" 190complete -c dnf -n"__fish_seen_subcommand_from mark" -xa install -d"Mark package installed" 191complete -c dnf -n"__fish_seen_subcommand_from mark" -xa remove -d"Unmarks installed package" 192complete -c dnf -n"__fish_seen_subcommand_from mark" -xa group -d"Mark installed by group" 193 194# Module 195complete -c dnf -n __fish_use_subcommand -xa module -d"Manage modules" 196complete -c dnf -n"__fish_seen_subcommand_from module" -xa install -d"Install module" 197complete -c dnf -n"__fish_seen_subcommand_from module" -xa update -d"Update modules" 198complete -c dnf -n"__fish_seen_subcommand_from module" -xa remove -d"Remove module" 199complete -c dnf -n"__fish_seen_subcommand_from module" -xa enable -d"Enable a module" 200complete -c dnf -n"__fish_seen_subcommand_from module" -xa disable -d"Disable a module" 201complete -c dnf -n"__fish_seen_subcommand_from module" -xa reset -d"Reset module state" 202complete -c dnf -n"__fish_seen_subcommand_from module" -xa list -d"List modules" 203complete -c dnf -n"__fish_seen_subcommand_from module; and __fish_seen_subcommand_from list" -l all -d"Lists all module " 204complete -c dnf -n"__fish_seen_subcommand_from module; and __fish_seen_subcommand_from list" -l enabled -d"Lists enabled module" 205complete -c dnf -n"__fish_seen_subcommand_from module; and __fish_seen_subcommand_from list" -l disabled -d"Lists disabled module" 206complete -c dnf -n"__fish_seen_subcommand_from module; and __fish_seen_subcommand_from list" -l installed -d"List installed modules" 207complete -c dnf -n"__fish_seen_subcommand_from module" -xa info -d"Print module information" 208complete -c dnf -n"__fish_seen_subcommand_from module; and __fish_seen_subcommand_from info" -l profile -d"Print module profiles information" 209 210# Offline-distrosync 211complete -c dnf -n __fish_use_subcommand -xa offline-distrosync -d"Synchronizes packages to match the latest" 212complete -c dnf -n"__fish_seen_subcommand_from offline-distrosync" -xa download -d"Download updates for offline upgrade" 213complete -c dnf -n"__fish_seen_subcommand_from offline-distrosync" -xa clean -d"Remove cached packages" 214complete -c dnf -n"__fish_seen_subcommand_from offline-distrosync" -xa reboot -d"Reboot and install packages" 215complete -c dnf -n"__fish_seen_subcommand_from offline-distrosync" -xa upgrade -d"Install cached packages without reboot" 216complete -c dnf -n"__fish_seen_subcommand_from offline-distrosync" -xa log -d"Show logs of upgrade attempts" 217 218# Offline-upgrade 219complete -c dnf -n __fish_use_subcommand -xa offline-upgrade -d"Prepare offline upgrade of the system" 220complete -c dnf -n"__fish_seen_subcommand_from offline-upgrade" -xa download -d"Download updates for offline upgrade" 221complete -c dnf -n"__fish_seen_subcommand_from offline-upgrade" -xa clean -d"Remove cached packages" 222complete -c dnf -n"__fish_seen_subcommand_from offline-upgrade" -xa reboot -d"Reboot and install packages" 223complete -c dnf -n"__fish_seen_subcommand_from offline-upgrade" -xa log -d"Show logs of upgrade attempts" 224 225# Provides 226complete -c dnf -n __fish_use_subcommand -xa provides -d"Finds packages providing the given command" 227 228# Reinstall 229complete -c dnf -n __fish_use_subcommand -xa" $dnf_reinstall_cmds " -d"Reinstalls a package" 230complete -c dnf -n"__fish_seen_subcommand_from $dnf_reinstall_cmds " \ 231 -xa"(__fish_dnf_list_installed_packages)" 232 233# Remove 234complete -c dnf -n __fish_use_subcommand -xa" $dnf_remove_cmds " -d"Remove packages" 235complete -c dnf -n"__fish_seen_subcommand_from $dnf_remove_cmds " \ 236 -xa"(__fish_dnf_list_installed_packages)" 237complete -c dnf -n"__fish_seen_subcommand_from remove" -l duplicates -d"Removes older version of duplicated packages" 238complete -c dnf -n"__fish_seen_subcommand_from remove" -l oldinstallonly -d"Removes old installonly packages" 239 240# Repolist and Repoinfo 241complete -c dnf -n __fish_use_subcommand -xa repoinfo -d"Verbose repolist" 242complete -c dnf -n __fish_use_subcommand -xa repolist -d"Lists all enabled repositories" 243 244for iin repolist repoinfo 245complete -c dnf -n"__fish_seen_subcommand_from $i " -l enabled -d"Lists all enabled repositories" 246complete -c dnf -n"__fish_seen_subcommand_from $i " -l disabled -d"Lists all disabled repositories" 247complete -c dnf -n"__fish_seen_subcommand_from $i " -l all -d"Lists all repositories" 248end 249 250# Repoquery 251complete -c dnf -n __fish_use_subcommand -xa repoquery -d"Queries DNF repositories" 252complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l querytags -d"Provides the list of tags" 253 254# repoquery select options 255complete -c dnf -n"__fish_seen_subcommand_from repoquery" -s a -l all 256complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l enabled 257complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l arch -l archlist 258complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l duplicates 259complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l unneeded 260complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l available 261complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l extras 262complete -c dnf -n"__fish_seen_subcommand_from repoquery" -s f -l file 263complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l installed 264complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l installonly 265complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l latest-limit 266complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l recent 267complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l repo 268complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l unsatisfied 269complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l upgrades 270complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l userinstalled 271complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l whatdepends 272complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l whatconflicts 273complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l whatenhances 274complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l whatobsoletes 275complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l whatprovides 276complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l whatrecommends 277complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l whatrequires 278complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l whatsuggests 279complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l whatsupplements 280complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l alldeps 281complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l exactdeps 282complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l srpm 283 284# System-upgrade 285complete -c dnf -n __fish_use_subcommand -xa system-upgrade -d"Prepare major version upgrade of the system" 286complete -c dnf -n"__fish_seen_subcommand_from system-upgrade" -xa download -d"Download updates for offline upgrade" 287complete -c dnf -n"__fish_seen_subcommand_from system-upgrade" -xa clean -d"Remove cached packages" 288complete -c dnf -n"__fish_seen_subcommand_from system-upgrade" -xa reboot -d"Reboot and install packages" 289complete -c dnf -n"__fish_seen_subcommand_from system-upgrade" -xa upgrade -d"Install cached packages without reboot" 290complete -c dnf -n"__fish_seen_subcommand_from system-upgrade" -xa log -d"Show logs of upgrade attempts" 291 292# Query options 293complete -c dnf -n"__fish_seen_subcommand_from repoquery" -s i -l info -d"Show detailed information about the package" 294complete -c dnf -n"__fish_seen_subcommand_from repoquery" -s l -l list -d"Show the list of files in the package" 295complete -c dnf -n"__fish_seen_subcommand_from repoquery" -s s -l source -d"Show the package source RPM name" 296complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l changelogs -d"Print the package changelogs" 297complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l conflicts -d"Display capabilities that the package conflicts with" 298complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l depends -d"Display capabilities that the package depends on" 299complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l enhances -d"Display capabilities enhanced by the package" 300complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l location -d"Show a location where the package could be downloaded from" 301complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l obsoletes -d"Display capabilities that the package obsoletes" 302complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l provides -d"Display capabilities provided by the package" 303complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l recommends -d"Display capabilities recommended by the package" 304complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l requires -d"Display capabilities that the package depends on" 305complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l requires-pre -d"Display capabilities that the package depends on" 306complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l suggests -d"Display capabilities suggested by the package" 307complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l supplements -d"Display capabilities supplemented by the package" 308complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l tree -d"Display a recursive tree of packages" 309complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l deplist -d"Produce a list of all dependencies" 310complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l nvr -d"Format like name-version-release" 311complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l nevra -d"Format like name-epoch:version-release.architecture" 312complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l envra -d"Format like epoch:name-version-release.architecture" 313complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l qf -l queryformat -d"Custom display format" 314complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l recursive -d"Query packages recursively" 315complete -c dnf -n"__fish_seen_subcommand_from repoquery" -l resolve -d"Resolve capabilities to originating packages" 316 317# Repository-Packages 318complete -c dnf -n __fish_use_subcommand -xa repository-packages -d"Run commands on all packages in the repository" 319 320# Search 321complete -c dnf -n __fish_use_subcommand -xa search -d"Search package metadata for keywords" 322complete -c dnf -n"__fish_seen_subcommand_from search" -l all -d"Lists packages that match at least one of the keys" 323 324# Shell 325complete -c dnf -n __fish_use_subcommand -xa shell -d"Opens an interactive shell" 326 327# Swap 328complete -c dnf -n __fish_use_subcommand -xa swap -d"Remove spec and install spec in one transaction" 329 330# Updateinfo 331complete -c dnf -n __fish_use_subcommand -xa updateinfo -d"Display information about update advisories" 332complete -c dnf -n"__fish_seen_subcommand_from updateinfo" -l summary -d"Displays the summary" 333complete -c dnf -n"__fish_seen_subcommand_from updateinfo" -l list -d"List of advisories" 334complete -c dnf -n"__fish_seen_subcommand_from updateinfo" -l info -d"Detailed information" 335 336# updateinfo <availability> options 337complete -c dnf -n"__fish_seen_subcommand_from updateinfo" -l all 338complete -c dnf -n"__fish_seen_subcommand_from updateinfo" -l available 339complete -c dnf -n"__fish_seen_subcommand_from updateinfo" -l installed 340complete -c dnf -n"__fish_seen_subcommand_from updateinfo" -l updates 341 342# Upgrade 343complete -c dnf -n __fish_use_subcommand -xa" $dnf_upgrade_cmds " -d"Updates packages" 344complete -c dnf -n"__fish_seen_subcommand_from $dnf_upgrade_cmds " -xa"(__fish_dnf_list_installed_packages)" 345 346# Upgrade-Minimal 347complete -c dnf -n __fish_use_subcommand -xa upgrade-minimal -d"Updates packages" 348complete -c dnf -n"__fish_seen_subcommand_from upgrade-minimal" -xa"(__fish_dnf_list_installed_packages)" 349 350# Versionlock 351if test -f /etc/dnf/plugins/versionlock.conf 352function __fish_dnf_current_versionlock_list 353dnf versionlock list| grep -v metadata 354end 355 356complete -c dnf -n __fish_use_subcommand -xa versionlock -d"DNF versionlock plugin" 357# - add 358complete -c dnf -n"__fish_seen_subcommand_from versionlock" -xa add -d"Add a versionlock for all available packages matching the spec" 359complete -c dnf -n"__fish_seen_subcommand_from versionlock; and __fish_seen_subcommand_from add" -xa"(__fish_dnf_list_installed_packages)" 360# - exclude 361complete -c dnf -n"__fish_seen_subcommand_from versionlock" -xa exclude -d"Add an exclude (within versionlock) for the available packages matching the spec" 362complete -c dnf -n"__fish_seen_subcommand_from versionlock; and __fish_seen_subcommand_from exclude" -xa"(__fish_dnf_list_installed_packages)" 363# - delete 364complete -c dnf -n"__fish_seen_subcommand_from versionlock" -xa delete -d"Remove any matching versionlock entries" 365complete -c dnf -n"__fish_seen_subcommand_from versionlock; and __fish_seen_subcommand_from delete" -xa"(__fish_dnf_current_versionlock_list)" 366# - list 367complete -c dnf -n"__fish_seen_subcommand_from versionlock" -xa list -d"List the current versionlock entries" 368complete -c dnf -n"__fish_seen_subcommand_from versionlock; and __fish_seen_subcommand_from list" -xa"(false)" 369# - clear 370complete -c dnf -n"__fish_seen_subcommand_from versionlock" -xa clear -d"Remove all versionlock entries" 371complete -c dnf -n"__fish_seen_subcommand_from versionlock; and __fish_seen_subcommand_from clear" -xa"(false)" 372end 373 374# Options: 375complete -c dnf -s4 -d"Use IPv4 only" 376complete -c dnf -s6 -d"Use IPv6 only" 377complete -c dnf -l advisory -l advisories -d"Include packages corresponding to the advisory ID" 378complete -c dnf -l allowerasing -d"Allow erasing of installed packages to resolve dependencies" 379complete -c dnf -l assumeno -d"Answer no for all questions" 380complete -c dnf -s b -l best -d"Try the best available package versions in transactions" 381complete -c dnf -l bugfix -d"Include packages that fix a bugfix issue" 382complete -c dnf -l bz -l bzs -d"Include packages that fix a Bugzilla ID" 383complete -c dnf -s C -l cacheonly -d"Run entirely from system cache" 384complete -c dnf -l color -xa"always never auto" -d"Control whether color is used" 385complete -c dnf -s c -l config -d"Configuration file location" 386complete -c dnf -l cve -l cves -d"Include packages that fix a CVE" 387complete -c dnf -s d -l debuglevel -d"Debugging output level" 388complete -c dnf -l debugsolver -d"Dump dependency solver debugging info" 389complete -c dnf -l disableexcludes -l disableexcludepkgs -d"Disable excludes" 390complete -c dnf -l disable -l set-disabled -d"Disable specified repositories" 391complete -c dnf -l disableplugin -d"Disable the listed plugins specified" 392complete -c dnf -l disablerepo -d"Disable specified repositories" 393complete -c dnf -l downloaddir -l destdir -d"Change downloaded packages to provided directory" 394complete -c dnf -l downloadonly -d"Download packages without performing any transaction" 395complete -c dnf -l enable -l set-enabled -d"Enable specified repositories" 396complete -c dnf -l enableplugin -d"Enable the listed plugins" 397complete -c dnf -l enablerepo -d"Enable additional repositories" 398complete -c dnf -l enhancement -d"Include enhancement relevant packages" 399complete -c dnf -s x -l exclude -d"Exclude packages specified" 400complete -c dnf -l forcearch -d"Force the use of the specified architecture" 401complete -c dnf -s h -l help -l help-i -d"Show the help" 402complete -c dnf -l installroot -d"Specifies an alternative installroot" 403complete -c dnf -l newpackage -d"Include newpackage relevant packages" 404complete -c dnf -l noautoremove -d"Disable autoremove" 405complete -c dnf -l nobest -d"Set best option to False" 406complete -c dnf -l nodocs -d"Do not install documentation" 407complete -c dnf -l nogpgcheck -d"Skip checking GPG signatures on packages" 408complete -c dnf -l noplugins -d"Disable all plugins" 409complete -c dnf -l obsoletes -d"Enables obsoletes processing logic" 410complete -c dnf -s q -l quiet -d"Quiet mode" 411complete -c dnf -s R -l randomwait -d"Maximum command wait time" 412complete -c dnf -l refresh -d"Set metadata as expired before running the command" 413complete -c dnf -l releasever -d"Configure the distribution release" 414complete -c dnf -l repofrompath -d"Specify repository to add to the repositories for this query" 415complete -c dnf -l repo -l repoid -d"Enable just specific repositories by an id or a glob" 416complete -c dnf -l rpmverbosity -d"RPM debug scriptlet output level" 417complete -c dnf -l sec-severity -l secseverity -d"Includes packages that provide a fix for an issue of the specified severity" 418complete -c dnf -l security -d"Includes packages that provide a fix for a security issue" 419complete -c dnf -l setopt -d"Override a configuration option" 420complete -c dnf -l skip-broken -d"Skips broken packages" 421complete -c dnf -l showduplicates -d"Shows duplicate packages" 422complete -c dnf -s v -l verbose -d"Verbose mode" 423complete -c dnf -l version -d"Shows DNF version and exit" 424complete -c dnf -s y -l assumeyes -d"Answer yes for all questions" 425complete -c dnf -s y -l skip-file-locks -d"Skips acquiring file locks"