Add subcommand options completion for zypper

This commit is contained in:
Sam Yu 2018-07-03 13:45:39 -07:00 committed by ridiculousfish
parent 8c09d6e063
commit 495c09fe6b

View file

@ -2,7 +2,9 @@
set -g __fish_zypper_all_commands shell sh repos lr addrepo ar removerepo rr renamerepo nr modifyrepo mr refresh ref clean cc services ls addservice as modifyservice ms removeservice rs refresh-services refs install in remove rm verify ve source-install si install-new-recommends inr update up list-updates lu patch list-patches lp dist-upgrade dup patch-check pchk search se info if patch-info pattern-info product-info patches pch packages pa patterns pt products pd what-provides wp addlock al removelock rl locks ll cleanlocks cl versioncmp vcmp targetos tos licenses source-download
set -g __fish_zypper_pkg_commands in install rm remove info if addlock al removelock rl source-install si
set -g __fish_zypper_repo_commands repos lr addrepo ar removerepo rr renamerepo nr modifyrepo mr refresh ref clean cc packages pa
set -g __fish_zypper_repo_commands repos lr removerepo rr renamerepo nr modifyrepo mr refresh ref clean cc packages pa
set -g __fish_zypper_package_types package patch pattern product srcpackage application
set -g __fish_zypper_download_modes only in-advance in-heaps as-needed
function __fish_zypper_cmd_in_array
for i in (commandline -pco)
@ -29,12 +31,54 @@ function __fish_zypper_use_repo
end
function __fish_zypper_print_repos
for repofile in /etc/zypp/repos.d/*.repo
string replace -f -r '\[(.+)\]' '$1' < $repofile
argparse 'e/enabled' -- $argv
set -q _flag_e; and set -l enabled -E
set -l zypper_lr (zypper -t lr $enabled)
# Because spaces and special characters are allowed in repo aliases (bad
# practice though, but allowed), it's impossible to parse the aliases from
# zypper's output correctly. So we fetch them from the repo files.
set repos (cat /etc/zypp/repos.d/*.repo | string replace -rf '^\[(.+)\]$' '$1')
# Then use the aliases to match their names from zypper's output.
string replace -rf '^[\d\s]+\| ('(string escape -n $repos | string join \|)') +\| (.+)\s+\|.*\|.*\|.*$' '$1\t$2' -- $zypper_lr
end
function __fish_zypper_print_packages
set -l repo
set -l type
set -l idx
set -l args (commandline -poc)
while set -q args[1]
switch $args[1]
case '-t' '--type'
set -e args[1]
if contains -- $args[1] $__fish_zypper_package_types
set type $args[1]
end
case '-r' '--repo' '--from'
set -e args[1]
if contains -- $args[1] (__fish_zypper_print_repos -e | string replace -r '^(.+)\t.*$' '$1')
set repo $repo $args[1]
end
end
set -e args[1]
end
if test -z "$repo"
set idx /var/cache/zypp/solv/*/solv.idx
else
set idx /var/cache/zypp/solv/$repo/solv.idx
end
if test -z "$type"
cat $idx | string replace -rf '^([^\t]+)\t.*\t.*$' '$1'
else if test "$type" = "package"
cat $idx | string match -rv '^('(string join \| $__fish_zypper_package_types)'):' | string replace -rf '^([^\t]+)\t.*\t.*$' '$1'
else
cat $idx | string replace -rf "^$type"':([^\t]+)\t.*\t.*$' '$1\t'"$type"
end
end
complete -n '__fish_zypper_use_pkg' -c zypper -a '(__fish_print_packages)' -d 'Package'
complete -n '__fish_zypper_use_pkg' -c zypper -a '(__fish_zypper_print_packages)' -d 'Package'
complete -f -n '__fish_zypper_use_repo' -c zypper -a '(__fish_zypper_print_repos)' -d 'Repo'
complete -n '__fish_zypper_no_subcommand' -c zypper -a 'install in' -d 'Install packages'
@ -117,34 +161,39 @@ function __fish_zypper_is_subcommand_lr
__fish_zypper_cmd_in_array repos lr
end
complete -c zypper -n '__fish_zypper_is_subcommand_lr' -l export -s e -d 'Export all defined repositories as a single local .repo file'
complete -c zypper -n '__fish_zypper_is_subcommand_lr' -l alias -s a -d 'Show also repository alias'
complete -c zypper -n '__fish_zypper_is_subcommand_lr' -l name -s n -d 'Show also repository name'
complete -c zypper -n '__fish_zypper_is_subcommand_lr' -l uri -s u -d 'Show also base URI of repositories'
complete -c zypper -n '__fish_zypper_is_subcommand_lr' -l priority -s p -d 'Show also repository priority'
complete -c zypper -n '__fish_zypper_is_subcommand_lr' -l refresh -s r -d 'Show also the autorefresh flag'
complete -c zypper -n '__fish_zypper_is_subcommand_lr' -l details -s d -d 'Show more information like URI, priority, type'
complete -c zypper -n '__fish_zypper_is_subcommand_lr' -l service -s s -d 'Show also alias of parent service'
complete -c zypper -n '__fish_zypper_is_subcommand_lr' -l sort-by-uri -s U -d 'Sort the list by URI'
complete -c zypper -n '__fish_zypper_is_subcommand_lr' -l sort-by-priority -s P -d 'Sort the list by repository priority'
complete -c zypper -n '__fish_zypper_is_subcommand_lr' -l sort-by-alias -s A -d 'Sort the list by alias'
complete -c zypper -n '__fish_zypper_is_subcommand_lr' -l sort-by-name -s N -d 'Sort the list by name'
complete -c zypper -n '__fish_zypper_is_subcommand_lr' -l export -s e -d 'Export all defined repositories as a single local .repo file'
complete -c zypper -n '__fish_zypper_is_subcommand_lr' -l alias -s a -d 'Show also repository alias'
complete -c zypper -n '__fish_zypper_is_subcommand_lr' -l name -s n -d 'Show also repository name'
complete -c zypper -n '__fish_zypper_is_subcommand_lr' -l uri -s u -d 'Show also base URI of repositories'
complete -c zypper -n '__fish_zypper_is_subcommand_lr' -l priority -s p -d 'Show also repository priority'
complete -c zypper -n '__fish_zypper_is_subcommand_lr' -l refresh -s r -d 'Show also the autorefresh flag'
complete -c zypper -n '__fish_zypper_is_subcommand_lr' -l details -s d -d 'Show more information like URI, priority, type'
complete -c zypper -n '__fish_zypper_is_subcommand_lr' -l service -s s -d 'Show also alias of parent service'
complete -c zypper -n '__fish_zypper_is_subcommand_lr' -l show-enabled-only -s E -d 'Show enabled repos only'
complete -c zypper -n '__fish_zypper_is_subcommand_lr' -l sort-by-uri -s U -d 'Sort the list by URI'
complete -c zypper -n '__fish_zypper_is_subcommand_lr' -l sort-by-priority -s P -d 'Sort the list by repository priority'
complete -c zypper -n '__fish_zypper_is_subcommand_lr' -l sort-by-alias -s A -d 'Sort the list by alias'
complete -c zypper -n '__fish_zypper_is_subcommand_lr' -l sort-by-name -s N -d 'Sort the list by name'
function __fish_zypper_is_subcommand_ar
__fish_zypper_cmd_in_array addrepo ar
end
complete -c zypper -n '__fish_zypper_is_subcommand_ar' -l repo -s r -d 'Just another means to specify a .repo file to read'
complete -c zypper -n '__fish_zypper_is_subcommand_ar' -l type -s t -d 'Type of repository (yast2, rpm-md, plaindir)'
complete -c zypper -n '__fish_zypper_is_subcommand_ar' -l disable -s d -d 'Add the repository as disabled'
complete -c zypper -n '__fish_zypper_is_subcommand_ar' -l check -s c -d 'Probe URI'
complete -c zypper -n '__fish_zypper_is_subcommand_ar' -l no-check -s C -d "Don't probe URI, probe later during refresh"
complete -c zypper -n '__fish_zypper_is_subcommand_ar' -l name -s n -d 'Specify descriptive name for the repository'
complete -c zypper -n '__fish_zypper_is_subcommand_ar' -l keep-packages -s k -d 'Enable RPM files caching'
complete -c zypper -n '__fish_zypper_is_subcommand_ar' -l no-keep-packages -s K -d 'Disable RPM files caching'
complete -c zypper -n '__fish_zypper_is_subcommand_ar' -l gpgcheck -s g -d 'Enable GPG check for this repository'
complete -c zypper -n '__fish_zypper_is_subcommand_ar' -l no-gpgcheck -s G -d 'Disable GPG check for this repository'
complete -c zypper -n '__fish_zypper_is_subcommand_ar' -l refresh -s f -d 'Enable autorefresh of the repository'
complete -c zypper -n '__fish_zypper_is_subcommand_ar' -l repo -s r -d 'Just another means to specify a .repo file to read'
complete -c zypper -n '__fish_zypper_is_subcommand_ar' -l check -s c -d 'Probe URI'
complete -c zypper -n '__fish_zypper_is_subcommand_ar' -l no-check -s C -d "Don't probe URI, probe later during refresh"
complete -c zypper -n '__fish_zypper_is_subcommand_ar' -l name -s n -d 'Specify descriptive name for the repository'
complete -c zypper -n '__fish_zypper_is_subcommand_ar' -l disable -s d -d 'Add the repository as disabled'
complete -c zypper -n '__fish_zypper_is_subcommand_ar' -l refresh -s f -d 'Enable autorefresh of the repository'
complete -c zypper -n '__fish_zypper_is_subcommand_ar' -l priority -s p -d 'Set the priority of the repository'
complete -c zypper -n '__fish_zypper_is_subcommand_ar' -l keep-packages -s k -d 'Enable RPM files caching'
complete -c zypper -n '__fish_zypper_is_subcommand_ar' -l no-keep-packages -s K -d 'Disable RPM files caching'
complete -c zypper -n '__fish_zypper_is_subcommand_ar' -l gpgcheck -s g -d 'Enable GPG check for this repository'
complete -c zypper -n '__fish_zypper_is_subcommand_ar' -l gpgcheck-strict -d 'Enable strict GPG check for this repository'
complete -c zypper -n '__fish_zypper_is_subcommand_ar' -l gpgcheck-allow-unsigned -d 'Short hand for --gpgcheck-allow-unsigned-repo --gpgcheck-allow-unsigned-package'
complete -c zypper -n '__fish_zypper_is_subcommand_ar' -l gpgcheck-allow-unsigned-repo -d 'Enable GPG check but allow the repository metadata to be unsigned'
complete -c zypper -n '__fish_zypper_is_subcommand_ar' -l gpgcheck-allow-unsigned-package -d 'Enable GPG check but allow installing unsigned packages from this repository.'
complete -c zypper -n '__fish_zypper_is_subcommand_ar' -l no-gpgcheck -s G -d 'Disable GPG check for this repository'
function __fish_zypper_is_subcommand_rr
__fish_zypper_cmd_in_array removerepo rr
@ -157,20 +206,24 @@ function __fish_zypper_is_subcommand_mr
__fish_zypper_cmd_in_array modifyrepo mr
end
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l disable -s d -d "Disable the repository (but don't remove it)"
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l enable -s e -d 'Enable a disabled repository'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l refresh -s r -d 'Enable auto-refresh of the repository'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l no-refresh -s R -d 'Disable auto-refresh of the repository'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l name -s n -d 'Set a descriptive name for the repository'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l priority -s p -d 'Set priority of the repository'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l keep-packages -s k -d 'Enable RPM files caching'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l no-keep-packages -s K -d 'Disable RPM files caching'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l gpgcheck -s g -d 'Enable GPG check for this repository'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l no-gpgcheck -s G -d 'Disable GPG check for this repository'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l all -s a -d 'Apply changes to all repositories'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l local -s l -d 'Apply changes to all local repositories'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l remote -s t -d 'Apply changes to all remote repositories'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l medium-type -s m -d 'Apply changes to repositories of specified type'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l name -s n -d 'Set a descriptive name for the repository'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l disable -s d -d "Disable the repository"
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l enable -s e -d 'Enable the repository'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l refresh -s f -d 'Enable auto-refresh of the repository'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l no-refresh -s F -d 'Disable auto-refresh of the repository'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l priority -s p -d 'Set the priority of the repository'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l keep-packages -s k -d 'Enable RPM files caching'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l no-keep-packages -s K -d 'Disable RPM files caching'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l gpgcheck -s g -d 'Enable GPG check for this repository'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l gpgcheck-strict -d 'Enable strict GPG check for this repository'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l gpgcheck-allow-unsigned -d 'Short hand for --gpgcheck-allow-unsigned-repo --gpgcheck-allow-unsigned-package'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l gpgcheck-allow-unsigned-repo -d 'Enable GPG check but allow the repository metadata to be unsigned'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l gpgcheck-allow-unsigned-package -d 'Enable GPG check but allow installing unsigned packages from this repository.'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l no-gpgcheck -s G -d 'Disable GPG check for this repository'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l all -s a -d 'Apply changes to all repositories'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l local -s l -d 'Apply changes to all local repositories'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l remote -s t -d 'Apply changes to all remote repositories'
complete -c zypper -n '__fish_zypper_is_subcommand_mr' -l medium-type -s m -d 'Apply changes to repositories of specified type'
function __fish_zypper_is_subcommand_ref
__fish_zypper_cmd_in_array refresh ref
@ -181,20 +234,21 @@ complete -c zypper -n '__fish_zypper_is_subcommand_ref' -l force-build -s b -
complete -c zypper -n '__fish_zypper_is_subcommand_ref' -l force-download -s d -d 'Force download of raw metadata'
complete -c zypper -n '__fish_zypper_is_subcommand_ref' -l build-only -s B -d "Only build the database, don't download metadata"
complete -c zypper -n '__fish_zypper_is_subcommand_ref' -l download-only -s D -d "Only download raw metadata, don't build the database"
complete -c zypper -n '__fish_zypper_is_subcommand_ref' -l repo -s r -d 'Refresh only specified repositories'
complete -c zypper -n '__fish_zypper_is_subcommand_ref' -l repo -s r -r -a "(__fish_zypper_print_repos -e)" -d 'Refresh only specified repositories'
complete -c zypper -n '__fish_zypper_is_subcommand_ref' -l services -s s -d 'Refresh also services before refreshing repos'
function __fish_zypper_is_subcommand_ls
__fish_zypper_cmd_in_array services ls
end
complete -c zypper -n '__fish_zypper_is_subcommand_ls' -l uri -s u -d 'Show also base URI of repositories'
complete -c zypper -n '__fish_zypper_is_subcommand_ls' -l priority -s p -d 'Show also repository priority'
complete -c zypper -n '__fish_zypper_is_subcommand_ls' -l details -s d -d 'Show more information like URI, priority, type'
complete -c zypper -n '__fish_zypper_is_subcommand_ls' -l with-repos -s r -d 'Show also repositories belonging to the services'
complete -c zypper -n '__fish_zypper_is_subcommand_ls' -l sort-by-priority -s P -d 'Sort the list by repository priority'
complete -c zypper -n '__fish_zypper_is_subcommand_ls' -l sort-by-uri -s U -d 'Sort the list by URI'
complete -c zypper -n '__fish_zypper_is_subcommand_ls' -l sort-by-name -s N -d 'Sort the list by name'
complete -c zypper -n '__fish_zypper_is_subcommand_ls' -l uri -s u -d 'Show also base URI of repositories'
complete -c zypper -n '__fish_zypper_is_subcommand_ls' -l priority -s p -d 'Show also repository priority'
complete -c zypper -n '__fish_zypper_is_subcommand_ls' -l details -s d -d 'Show more information like URI, priority, type'
complete -c zypper -n '__fish_zypper_is_subcommand_ls' -l with-repos -s r -d 'Show also repositories belonging to the services'
complete -c zypper -n '__fish_zypper_is_subcommand_ls' -l show-enabled-only -s E -d 'Show enabled repos only'
complete -c zypper -n '__fish_zypper_is_subcommand_ls' -l sort-by-priority -s P -d 'Sort the list by repository priority'
complete -c zypper -n '__fish_zypper_is_subcommand_ls' -l sort-by-uri -s U -d 'Sort the list by URI'
complete -c zypper -n '__fish_zypper_is_subcommand_ls' -l sort-by-name -s N -d 'Sort the list by name'
function __fish_zypper_is_subcommand_as
__fish_zypper_cmd_in_array addservice as
@ -241,8 +295,8 @@ function __fish_zypper_is_subcommand_in
__fish_zypper_cmd_in_array install in
end
complete -c zypper -n '__fish_zypper_is_subcommand_in' -l repo -s r -d 'Load only the specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_in' -l type -s t -d 'Type of package (package, patch, pattern, product, srcpackage). Default: package'
complete -c zypper -n '__fish_zypper_is_subcommand_in' -l repo -s r -f -r -a "(__fish_zypper_print_repos -e)" -d 'Load only the specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_in' -l type -s t -f -r -a "$__fish_zypper_package_types" -d 'Type of package'
complete -c zypper -n '__fish_zypper_is_subcommand_in' -l name -s n -d 'Select packages by plain name, not by capability'
complete -c zypper -n '__fish_zypper_is_subcommand_in' -l capability -s C -d 'Select packages by capability'
complete -c zypper -n '__fish_zypper_is_subcommand_in' -l force -s f -d 'Install even if the item is already installed (reinstall), downgraded or changes vendor or architecture'
@ -250,20 +304,20 @@ complete -c zypper -n '__fish_zypper_is_subcommand_in' -l auto-agree-with-licens
complete -c zypper -n '__fish_zypper_is_subcommand_in' -l no-force-resolution -s R -d 'Do not force the solver to find solution, let it ask'
complete -c zypper -n '__fish_zypper_is_subcommand_in' -l dry-run -s D -d 'Test the installation, do not actually install'
complete -c zypper -n '__fish_zypper_is_subcommand_in' -l download-only -s d -d 'Only download the packages, do not install'
complete -c zypper -n '__fish_zypper_is_subcommand_in' -l oldpackage -d 'Allow to replace a newer item with an older one. Handy if you are doing a rollback. Unlike --force it will not enforce a reinstall'
complete -c zypper -n '__fish_zypper_is_subcommand_in' -l oldpackage -d 'Allow to replace a newer item with an older one.'
complete -c zypper -n '__fish_zypper_is_subcommand_in' -l debug-solver -d 'Create solver test case for debugging'
complete -c zypper -n '__fish_zypper_is_subcommand_in' -l no-recommends -d 'Do not install recommended packages, only required'
complete -c zypper -n '__fish_zypper_is_subcommand_in' -l recommends -d 'Install also recommended packages in addition to the required'
complete -c zypper -n '__fish_zypper_is_subcommand_in' -l force-resolution -d 'Force the solver to find a solution (even an aggressive one)'
complete -c zypper -n '__fish_zypper_is_subcommand_in' -l from -d 'Select packages from the specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_in' -l download -d 'Set the download-install mode. Available modes: only, in-advance, in-heaps, as-needed'
complete -c zypper -n '__fish_zypper_is_subcommand_in' -l from -f -r -a "(__fish_zypper_print_repos -e)" -d 'Select packages from the specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_in' -l download -f -r -a "$__fish_zypper_download_modes" -d 'Set the download-install mode'
function __fish_zypper_is_subcommand_rm
__fish_zypper_cmd_in_array remove rm
end
complete -c zypper -n '__fish_zypper_is_subcommand_rm' -l repo -s r -d 'Load only the specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_rm' -l type -s t -d 'Type of package (package, patch, pattern, product). Default: package'
complete -c zypper -n '__fish_zypper_is_subcommand_rm' -l repo -s r -r -a "(__fish_zypper_print_repos -e)" -d 'Load only the specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_rm' -l type -s t -r -a "$__fish_zypper_package_types" -d 'Type of package'
complete -c zypper -n '__fish_zypper_is_subcommand_rm' -l name -s n -d 'Select packages by plain name, not by capability'
complete -c zypper -n '__fish_zypper_is_subcommand_rm' -l capability -s C -d 'Select packages by capability'
complete -c zypper -n '__fish_zypper_is_subcommand_rm' -l no-force-resolution -s R -d 'Do not force the solver to find solution, let it ask'
@ -277,11 +331,11 @@ function __fish_zypper_is_subcommand_ve
__fish_zypper_cmd_in_array verify ve
end
complete -c zypper -n '__fish_zypper_is_subcommand_ve' -l repo -s r -d 'Load only the specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_ve' -l repo -s r -r -a "(__fish_zypper_print_repos -e)" -d 'Load only the specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_ve' -l dry-run -s D -d 'Test the repair, do not actually do anything to the system'
complete -c zypper -n '__fish_zypper_is_subcommand_ve' -l download-only -s d -d 'Only download the packages, do not install'
complete -c zypper -n '__fish_zypper_is_subcommand_ve' -l no-recommends -d 'Do not install recommended packages, only required'
complete -c zypper -n '__fish_zypper_is_subcommand_ve' -l download -d 'Set the download-install mode. Available modes: only, in-advance, in-heaps, as-needed'
complete -c zypper -n '__fish_zypper_is_subcommand_ve' -l download -f -r -a "$__fish_zypper_download_modes" -d 'Set the download-install mode'
complete -c zypper -n '__fish_zypper_is_subcommand_ve' -l recommends -d 'Install also recommended packages in addition to the required'
function __fish_zypper_is_subcommand_si
@ -290,30 +344,30 @@ end
complete -c zypper -n '__fish_zypper_is_subcommand_si' -l build-deps-only -s d -d 'Install only build dependencies of specified packages'
complete -c zypper -n '__fish_zypper_is_subcommand_si' -l no-build-deps -s D -d "Don't install build dependencies"
complete -c zypper -n '__fish_zypper_is_subcommand_si' -l repo -s r -d 'Install packages only from specified repositories'
complete -c zypper -n '__fish_zypper_is_subcommand_si' -l repo -s r -r -a "(__fish_zypper_print_repos -e)" -d 'Install packages only from specified repositories'
function __fish_zypper_is_subcommand_inr
__fish_zypper_cmd_in_array install-new-recommends inr
end
complete -c zypper -n '__fish_zypper_is_subcommand_inr' -l repo -s r -d 'Load only the specified repositories'
complete -c zypper -n '__fish_zypper_is_subcommand_inr' -l repo -s r -r -a "(__fish_zypper_print_repos -e)" -d 'Load only the specified repositories'
complete -c zypper -n '__fish_zypper_is_subcommand_inr' -l dry-run -s D -d 'Test the installation, do not actually install'
complete -c zypper -n '__fish_zypper_is_subcommand_inr' -l download-only -s d -d 'Only download the packages, do not install'
complete -c zypper -n '__fish_zypper_is_subcommand_inr' -l download -d 'Set the download-install mode. Available modes: only, in-advance, in-heaps, as-needed'
complete -c zypper -n '__fish_zypper_is_subcommand_inr' -l download -f -r -a "$__fish_zypper_download_modes" -d 'Set the download-install mode'
complete -c zypper -n '__fish_zypper_is_subcommand_inr' -l debug-solver -d 'Create solver test case for debugging'
function __fish_zypper_is_subcommand_up
__fish_zypper_cmd_in_array update up
end
complete -c zypper -n '__fish_zypper_is_subcommand_up' -l type -s t -d 'Type of package (package, patch, pattern, product, srcpackage). Default: package'
complete -c zypper -n '__fish_zypper_is_subcommand_up' -l repo -s r -d 'Load only the specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_up' -l type -s t -r -a "$__fish_zypper_package_types" -d 'Type of package'
complete -c zypper -n '__fish_zypper_is_subcommand_up' -l repo -s r -r -a "(__fish_zypper_print_repos -e)" -d 'Load only the specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_up' -l auto-agree-with-licenses -s l -d "Automatically say 'yes' to third party license confirmation prompt"
complete -c zypper -n '__fish_zypper_is_subcommand_up' -l no-force-resolution -s R -d 'Do not force the solver to find solution, let it ask'
complete -c zypper -n '__fish_zypper_is_subcommand_up' -l dry-run -s D -d 'Test the update, do not actually update'
complete -c zypper -n '__fish_zypper_is_subcommand_up' -l download-only -s d -d 'Only download the packages, do not install'
complete -c zypper -n '__fish_zypper_is_subcommand_up' -l skip-interactive -d 'Skip interactive updates'
complete -c zypper -n '__fish_zypper_is_subcommand_up' -l download -d 'Set the download-install mode. Available modes: only, in-advance, in-heaps, as-needed'
complete -c zypper -n '__fish_zypper_is_subcommand_up' -l download -f -r -a "$__fish_zypper_download_modes" -d 'Set the download-install mode'
complete -c zypper -n '__fish_zypper_is_subcommand_up' -l force-resolution -d 'Force the solver to find a solution (even an aggressive one)'
complete -c zypper -n '__fish_zypper_is_subcommand_up' -l best-effort -d "Do a 'best effort' approach to update. Updates to a lower than the latest version are also acceptable"
complete -c zypper -n '__fish_zypper_is_subcommand_up' -l debug-solver -d 'Create solver test case for debugging'
@ -324,8 +378,8 @@ function __fish_zypper_is_subcommand_lu
__fish_zypper_cmd_in_array list-updates lu
end
complete -c zypper -n '__fish_zypper_is_subcommand_lu' -l type -s t -d 'Type of package (package, patch, pattern, product). Default: package'
complete -c zypper -n '__fish_zypper_is_subcommand_lu' -l repo -s r -d 'List only updates from the specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_lu' -l type -s t -r -a "$__fish_zypper_package_types" -d 'Type of package'
complete -c zypper -n '__fish_zypper_is_subcommand_lu' -l repo -s r -r -a "(__fish_zypper_print_repos -e)" -d 'List only updates from the specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_lu' -l all -s a -d 'List all packages for which newer versions are available, regardless whether they are installable or not'
complete -c zypper -n '__fish_zypper_is_subcommand_lu' -l best-effort -d "Do a 'best effort' approach to update. Updates to a lower than the latest version are also acceptable"
@ -336,7 +390,7 @@ end
complete -c zypper -n '__fish_zypper_is_subcommand_lp' -l bugzilla -s b -d 'List needed patches for Bugzilla issues'
complete -c zypper -n '__fish_zypper_is_subcommand_lp' -l category -s g -d 'List all patches in this category'
complete -c zypper -n '__fish_zypper_is_subcommand_lp' -l all -s a -d 'List all patches, not only the needed ones'
complete -c zypper -n '__fish_zypper_is_subcommand_lp' -l repo -s r -d 'List only patches from the specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_lp' -l repo -s r -r -a "(__fish_zypper_print_repos -e)" -d 'List only patches from the specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_lp' -l date -d 'List patches issued up to the specified date <YYYY-MM-DD>'
complete -c zypper -n '__fish_zypper_is_subcommand_lp' -l cve -d 'List needed patches for CVE issues'
complete -c zypper -n '__fish_zypper_is_subcommand_lp' -l issuesstring -d 'Look for issues matching the specified string'
@ -345,15 +399,15 @@ function __fish_zypper_is_subcommand_dup
__fish_zypper_cmd_in_array dist-upgrade dup
end
complete -c zypper -n '__fish_zypper_is_subcommand_dup' -l repo -s r -d 'Load only the specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_dup' -l repo -s r -r -a "(__fish_zypper_print_repos -e)" -d 'Load only the specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_dup' -l auto-agree-with-licenses -s l -d "Automatically say 'yes' to third party license confirmation prompt"
complete -c zypper -n '__fish_zypper_is_subcommand_dup' -l dry-run -s D -d 'Test the upgrade, do not actually upgrade'
complete -c zypper -n '__fish_zypper_is_subcommand_dup' -l download-only -s d -d 'Only download the packages, do not install'
complete -c zypper -n '__fish_zypper_is_subcommand_dup' -l debug-solver -d 'Create solver test case for debugging'
complete -c zypper -n '__fish_zypper_is_subcommand_dup' -l no-recommends -d 'Do not install recommended packages, only required'
complete -c zypper -n '__fish_zypper_is_subcommand_dup' -l recommends -d 'Install also recommended packages in addition to the required'
complete -c zypper -n '__fish_zypper_is_subcommand_dup' -l from -d 'Restrict upgrade to specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_dup' -l download -d 'Set the download-install mode. Available modes: only, in-advance, in-heaps, as-needed'
complete -c zypper -n '__fish_zypper_is_subcommand_dup' -l from -f -r -a "(__fish_zypper_print_repos -e)" -d 'Restrict upgrade to specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_dup' -l download -f -r -a "$__fish_zypper_download_modes" -d 'Set the download-install mode'
complete -c zypper -n '__fish_zypper_is_subcommand_dup' -l no-allow-downgrade -d 'Do not allow installed resolvables to be downgraded'
complete -c zypper -n '__fish_zypper_is_subcommand_dup' -l allow-downgrade -d 'Allow installed resolvables to be downgraded'
complete -c zypper -n '__fish_zypper_is_subcommand_dup' -l no-allow-name-change -d 'Do not allow installed resolvables to change name'
@ -367,7 +421,7 @@ function __fish_zypper_is_subcommand_pchk
__fish_zypper_cmd_in_array patch-check pchk
end
complete -c zypper -n '__fish_zypper_is_subcommand_pchk' -l repo -s r -d 'Check for patches only in the specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_pchk' -l repo -s r -r -a "(__fish_zypper_print_repos -e)" -d 'Check for patches only in the specified repository'
function __fish_zypper_is_subcommand_se
__fish_zypper_cmd_in_array search se
@ -377,8 +431,8 @@ complete -c zypper -n '__fish_zypper_is_subcommand_se' -l search-descriptions -s
complete -c zypper -n '__fish_zypper_is_subcommand_se' -l case-sensitive -s C -d 'Perform case-sensitive search'
complete -c zypper -n '__fish_zypper_is_subcommand_se' -l installed-only -s i -d 'Show only packages that are already installed'
complete -c zypper -n '__fish_zypper_is_subcommand_se' -l uninstalled-only -s u -d 'Show only packages that are not currently installed'
complete -c zypper -n '__fish_zypper_is_subcommand_se' -l type -s t -d 'Search only for packages of the specified type'
complete -c zypper -n '__fish_zypper_is_subcommand_se' -l repo -s r -d 'Search only in the specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_se' -l type -s t -r -a "$__fish_zypper_package_types" -d 'Search only for packages of the specified type'
complete -c zypper -n '__fish_zypper_is_subcommand_se' -l repo -s r -r -a "(__fish_zypper_print_repos -e)" -d 'Search only in the specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_se' -l details -s s -d 'Show each available version in each repository on a separate line'
complete -c zypper -n '__fish_zypper_is_subcommand_se' -l sort-by-name -d 'Sort packages by name (default)'
complete -c zypper -n '__fish_zypper_is_subcommand_se' -l sort-by-repo -d 'Sort packages by repository'
@ -387,29 +441,43 @@ complete -c zypper -n '__fish_zypper_is_subcommand_se' -l match-any
complete -c zypper -n '__fish_zypper_is_subcommand_se' -l match-substrings -d 'Search for a match to partial words (default)'
complete -c zypper -n '__fish_zypper_is_subcommand_se' -l match-words -d 'Search for a match to whole words only'
complete -c zypper -n '__fish_zypper_is_subcommand_se' -l match-exact -d 'Searches for an exact package name'
complete -c zypper -n '__fish_zypper_is_subcommand_se' -l provides -d 'Search for packages which provide the search strings'
complete -c zypper -n '__fish_zypper_is_subcommand_se' -l recommends -d 'Search for packages which recommend the search strings'
complete -c zypper -n '__fish_zypper_is_subcommand_se' -l requires -d 'Search for packages which require the search strings'
complete -c zypper -n '__fish_zypper_is_subcommand_se' -l suggests -d 'Search for packages which suggest the search strings'
complete -c zypper -n '__fish_zypper_is_subcommand_se' -l conflicts -d 'Search packages conflicting with search strings'
complete -c zypper -n '__fish_zypper_is_subcommand_se' -l obsoletes -d 'Search for packages which obsolete the search strings'
function __fish_zypper_is_subcommand_if
__fish_zypper_cmd_in_array info if
end
complete -c zypper -n '__fish_zypper_is_subcommand_if' -l repo -s r -d 'Work only with the specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_if' -l type -s t -d 'Type of package (package, patch, pattern, product). Default: package'
complete -c zypper -n '__fish_zypper_is_subcommand_if' -l requires -d 'Show also requires and prerequires'
complete -c zypper -n '__fish_zypper_is_subcommand_if' -l recommends -d 'Show also recommends'
complete -c zypper -n '__fish_zypper_is_subcommand_if' -l repo -s r -r -a "(__fish_zypper_print_repos -e)" -d 'Work only with the specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_if' -l type -s t -r -a "$__fish_zypper_package_types" -d 'Type of package'
complete -c zypper -n '__fish_zypper_is_subcommand_if' -l provides -d 'Show symbols the package provides'
complete -c zypper -n '__fish_zypper_is_subcommand_if' -l requires -d 'Show symbols the package requires'
complete -c zypper -n '__fish_zypper_is_subcommand_if' -l conflicts -d 'Show symbols the package conflicts with'
complete -c zypper -n '__fish_zypper_is_subcommand_if' -l obsoletes -d 'Show symbols the package obsoletes'
complete -c zypper -n '__fish_zypper_is_subcommand_if' -l recommends -d 'Show symbols the package recommends'
complete -c zypper -n '__fish_zypper_is_subcommand_if' -l suggests -d 'Show symbols the package suggests'
function __fish_zypper_is_subcommand_pch
__fish_zypper_cmd_in_array patches pch
end
complete -c zypper -n '__fish_zypper_is_subcommand_pch' -l repo -s r -d 'Just another means to specify repository'
complete -c zypper -n '__fish_zypper_is_subcommand_pch' -l repo -s r -r -a "(__fish_zypper_print_repos -e)" -d 'Just another means to specify repository'
function __fish_zypper_is_subcommand_pa
__fish_zypper_cmd_in_array packages pa
end
complete -c zypper -n '__fish_zypper_is_subcommand_pa' -l repo -s r -d 'Just another means to specify repository'
complete -c zypper -n '__fish_zypper_is_subcommand_pa' -l repo -s r -r -a "(__fish_zypper_print_repos -e)" -d 'Just another means to specify repository'
complete -c zypper -n '__fish_zypper_is_subcommand_pa' -l installed-only -s i -d 'Show only installed packages'
complete -c zypper -n '__fish_zypper_is_subcommand_pa' -l uninstalled-only -s u -d 'Show only packages which are not installed'
complete -c zypper -n '__fish_zypper_is_subcommand_pa' -l orphaned -d 'Show packages which are orphaned (without repository)'
complete -c zypper -n '__fish_zypper_is_subcommand_pa' -l suggested -d 'Show packages which are suggested'
complete -c zypper -n '__fish_zypper_is_subcommand_pa' -l recommended -d 'Show packages which are recommended'
complete -c zypper -n '__fish_zypper_is_subcommand_pa' -l unneeded -d 'Show packages which are unneeded'
complete -c zypper -n '__fish_zypper_is_subcommand_pa' -l sort-by-name -s N -d 'Sort the list by package name'
complete -c zypper -n '__fish_zypper_is_subcommand_pa' -l sort-by-repo -s R -d 'Sort the list by repository'
@ -417,7 +485,7 @@ function __fish_zypper_is_subcommand_pt
__fish_zypper_cmd_in_array patterns pt
end
complete -c zypper -n '__fish_zypper_is_subcommand_pt' -l repo -s r -d 'Just another means to specify repository'
complete -c zypper -n '__fish_zypper_is_subcommand_pt' -l repo -s r -r -a "(__fish_zypper_print_repos -e)" -d 'Just another means to specify repository'
complete -c zypper -n '__fish_zypper_is_subcommand_pt' -l installed-only -s i -d 'Show only installed patterns'
complete -c zypper -n '__fish_zypper_is_subcommand_pt' -l uninstalled-only -s u -d 'Show only patterns which are not installed'
@ -425,7 +493,7 @@ function __fish_zypper_is_subcommand_pd
__fish_zypper_cmd_in_array products pd
end
complete -c zypper -n '__fish_zypper_is_subcommand_pd' -l repo -s r -d 'Just another means to specify repository'
complete -c zypper -n '__fish_zypper_is_subcommand_pd' -l repo -s r -r -a "(__fish_zypper_print_repos -e)" -d 'Just another means to specify repository'
complete -c zypper -n '__fish_zypper_is_subcommand_pd' -l installed-only -s i -d 'Show only installed products'
complete -c zypper -n '__fish_zypper_is_subcommand_pd' -l uninstalled-only -s u -d 'Show only products which are not installed'
@ -433,15 +501,15 @@ function __fish_zypper_is_subcommand_al
__fish_zypper_cmd_in_array addlock al
end
complete -c zypper -n '__fish_zypper_is_subcommand_al' -l repo -s r -d 'Restrict the lock to the specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_al' -l type -s t -d 'Type of package (package, patch, pattern, product). Default: package'
complete -c zypper -n '__fish_zypper_is_subcommand_al' -l repo -s r -r -a "(__fish_zypper_print_repos -e)" -d 'Restrict the lock to the specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_al' -l type -s t -r -a "$__fish_zypper_package_types" -d 'Type of package'
function __fish_zypper_is_subcommand_rl
__fish_zypper_cmd_in_array removelock rl
end
complete -c zypper -n '__fish_zypper_is_subcommand_rl' -l repo -s r -d 'Remove only locks with specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_rl' -l type -s t -d 'Type of package (package, patch, pattern, product). Default: package'
complete -c zypper -n '__fish_zypper_is_subcommand_rl' -l repo -s r -r -a "(__fish_zypper_print_repos -e)" -d 'Remove only locks with specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_rl' -l type -s t -r -a "$__fish_zypper_package_types" -d 'Type of package'
function __fish_zypper_is_subcommand_cl
__fish_zypper_cmd_in_array cleanlocks cl
@ -466,7 +534,7 @@ function __fish_zypper_is_subcommand_clean
__fish_zypper_cmd_in_array clean
end
complete -c zypper -n '__fish_zypper_is_subcommand_clean' -l repo -s r -d 'Clean only specified repositories'
complete -c zypper -n '__fish_zypper_is_subcommand_clean' -l repo -s r -r -a "(__fish_zypper_print_repos)" -d 'Clean only specified repositories'
complete -c zypper -n '__fish_zypper_is_subcommand_clean' -l metadata -s m -d 'Clean metadata cache'
complete -c zypper -n '__fish_zypper_is_subcommand_clean' -l raw-metadata -s M -d 'Clean raw metadata cache'
complete -c zypper -n '__fish_zypper_is_subcommand_clean' -l all -s a -d 'Clean both metadata and package caches'
@ -478,7 +546,7 @@ end
complete -c zypper -n '__fish_zypper_is_subcommand_patch' -l auto-agree-with-licenses -s l -d "Automatically say 'yes' to third party license confirmation prompt"
complete -c zypper -n '__fish_zypper_is_subcommand_patch' -l bugzilla -s b -d 'Install patch fixing the specified bugzilla issue'
complete -c zypper -n '__fish_zypper_is_subcommand_patch' -l category -s g -d 'Install all patches in this category'
complete -c zypper -n '__fish_zypper_is_subcommand_patch' -l repo -s r -d 'Load only the specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_patch' -l repo -s r -r -a "(__fish_zypper_print_repos -e)" -d 'Load only the specified repository'
complete -c zypper -n '__fish_zypper_is_subcommand_patch' -l dry-run -s D -d 'Test the update, do not actually update'
complete -c zypper -n '__fish_zypper_is_subcommand_patch' -l download-only -s d -d 'Only download the packages, do not install'
complete -c zypper -n '__fish_zypper_is_subcommand_patch' -l cve -d 'Install patch fixing the specified CVE issue'
@ -486,7 +554,7 @@ complete -c zypper -n '__fish_zypper_is_subcommand_patch' -l date
complete -c zypper -n '__fish_zypper_is_subcommand_patch' -l debug-solver -d 'Create solver test case for debugging'
complete -c zypper -n '__fish_zypper_is_subcommand_patch' -l no-recommends -d 'Do not install recommended packages, only required'
complete -c zypper -n '__fish_zypper_is_subcommand_patch' -l recommends -d 'Install also recommended packages in addition to the required'
complete -c zypper -n '__fish_zypper_is_subcommand_patch' -l download -d 'Set the download-install mode. Available modes: only, in-advance, in-heaps, as-needed'
complete -c zypper -n '__fish_zypper_is_subcommand_patch' -l download -f -r -a "$__fish_zypper_download_modes" -d 'Set the download-install mode'
complete -c zypper -n '__fish_zypper_is_subcommand_patch' -l skip-interactive -d 'Skip interactive patches'
complete -c zypper -n '__fish_zypper_is_subcommand_patch' -l with-interactive -d 'Do not skip interactive patches'