_xbps: update zsh completion.
This commit is contained in:
parent
acb00d52e4
commit
1ac25a53c4
51
data/_xbps
51
data/_xbps
@ -1,4 +1,4 @@
|
|||||||
#compdef xbps-checkvers xbps-create xbps-dgraph xbps-install xbps-pkgdb xbps-query xbps-reconfigure xbps-remove xbps-rindex xbps-uchroot xbps-uhelper
|
#compdef xbps-checkvers xbps-create xbps-dgraph xbps-install xbps-pkgdb xbps-query xbps-reconfigure xbps-remove xbps-rindex xbps-uchroot xbps-uunshare xbps-uhelper
|
||||||
|
|
||||||
_xbps_common=(
|
_xbps_common=(
|
||||||
{-C,--config=-}'[Full path to configuration file]:config file:_files'
|
{-C,--config=-}'[Full path to configuration file]:config file:_files'
|
||||||
@ -28,14 +28,15 @@ _xbps_properties=(
|
|||||||
license
|
license
|
||||||
maintainer
|
maintainer
|
||||||
metafile-sha256
|
metafile-sha256
|
||||||
packaged-with
|
|
||||||
pkgver
|
pkgver
|
||||||
preserve
|
preserve
|
||||||
provides
|
provides
|
||||||
remove-msg
|
remove-msg
|
||||||
remove-script
|
remove-script
|
||||||
replaces
|
replaces
|
||||||
|
repolock
|
||||||
repository
|
repository
|
||||||
|
reverts
|
||||||
shlib-provides
|
shlib-provides
|
||||||
shlib-requires
|
shlib-requires
|
||||||
short_desc
|
short_desc
|
||||||
@ -89,11 +90,17 @@ _xbps_create() {
|
|||||||
|
|
||||||
_xbps_dgraph() {
|
_xbps_dgraph() {
|
||||||
_arguments : \
|
_arguments : \
|
||||||
'-c[Path to configuration file]:config file:_files' \
|
{-C,--config=-}'[Full path to configuration file]:config file:_files' \
|
||||||
'-g[Generate a default config file]' \
|
{-c,--graph-config}'[Path to configuration file]:config file:_files' \
|
||||||
'-o[Output file]:output file:_files' \
|
{-d,--debug}'[Debug mode shown to stderr]' \
|
||||||
'-R[Also generate reverse dependencies in the graph]' \
|
{-h,--help}'[Print help usage]' \
|
||||||
'-r[Full path to rootdir]:root dir:_files -/' \
|
{-M,--memory-sync}'[Keep remote repository data in memory only]' \
|
||||||
|
{-r,--rootdir}'[Full path to rootdir]:root dir:_files -/' \
|
||||||
|
{-R,--repository}'[Enable repository mode]' \
|
||||||
|
- '(mode)' \
|
||||||
|
{-g,--gen-config}'[Generate a default config file]' \
|
||||||
|
{-f,--fulldeptree}'[Generate a dependency graph]' \
|
||||||
|
{-m,--metadata}'[Generate a metadata graph]' \
|
||||||
':package:_xbps_all_packages'
|
':package:_xbps_all_packages'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,7 +111,9 @@ _xbps_install() {
|
|||||||
{-A,--automatic}'[Set automatic installation mode]' \
|
{-A,--automatic}'[Set automatic installation mode]' \
|
||||||
{-c,--cachedir=-}'[Full path to cachedir]:cache dir:_files -/' \
|
{-c,--cachedir=-}'[Full path to cachedir]:cache dir:_files -/' \
|
||||||
{-f,--force}'[Force package re-installation]' \
|
{-f,--force}'[Force package re-installation]' \
|
||||||
{-R,--repository=-}'[Add repository to the top of the list]:repository url:_files -/' \
|
{-i,--ignore-conf-repos}'[Ignore repositories defined in xbps.d]' \
|
||||||
|
{-M,--memory-sync}'[Keep remote repository data in memory only]' \
|
||||||
|
'*'{-R,--repository=-}'[Add repository to the top of the list]:repository url:_files -/' \
|
||||||
{-S,--sync}'[Sync remote repository index]' \
|
{-S,--sync}'[Sync remote repository index]' \
|
||||||
{-u,--update}'[Update target packages]' \
|
{-u,--update}'[Update target packages]' \
|
||||||
{-y,--yes}'[Assume yes to all questions]' \
|
{-y,--yes}'[Assume yes to all questions]' \
|
||||||
@ -115,8 +124,8 @@ _xbps_pkgdb() {
|
|||||||
_arguments -s : \
|
_arguments -s : \
|
||||||
$_xbps_common \
|
$_xbps_common \
|
||||||
{-a,--all}'[Process all packages]' \
|
{-a,--all}'[Process all packages]' \
|
||||||
{-m,--mode}'[Change to this mode]:mode:(auto manual hold unhold)' \
|
{-m,--mode}'[Change to this mode]:mode:(auto manual hold unhold repolock repounlock)' \
|
||||||
{-u,--update}'[Update pkgdb to the latest format]'
|
{-u,--update}'[Update pkgdb to the latest format]' \
|
||||||
'*:installed packages:_xbps_installed_packages'
|
'*:installed packages:_xbps_installed_packages'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,12 +133,14 @@ _xbps_query() {
|
|||||||
_arguments -s : \
|
_arguments -s : \
|
||||||
$_xbps_common \
|
$_xbps_common \
|
||||||
{-c,--cachedir=-}'[Full path to cachedir]:cache dir:_files -/' \
|
{-c,--cachedir=-}'[Full path to cachedir]:cache dir:_files -/' \
|
||||||
|
{-i,--ignore-conf-repos}'[Ignore repositories defined in xbps.d]' \
|
||||||
|
{-M,--memory-sync}'[Keep remote repository data in memory only]' \
|
||||||
{-p,--property=-}'[Show properties]:property:($_xbps_properties)' \
|
{-p,--property=-}'[Show properties]:property:($_xbps_properties)' \
|
||||||
--regex'[Use Extended Regular Expressions to match]' \
|
--regex'[Use Extended Regular Expressions to match]' \
|
||||||
--fulldeptree'[Full dependency tree for -x/--deps]' \
|
--fulldeptree'[Full dependency tree for -x/--deps]' \
|
||||||
{-R,--repository}'[Enable repository mode]' \
|
{-R,--repository}'[Enable repository mode]' \
|
||||||
--repository=-'[Add repository to the top of the list]:repository url:_files -/' \
|
'*'--repository=-'[Add repository to the top of the list]:repository url:_files -/' \
|
||||||
- '(actions)' \
|
- '(mode)' \
|
||||||
{-l,--list-pkgs}'[List installed packages]' \
|
{-l,--list-pkgs}'[List installed packages]' \
|
||||||
{-L,--list-repos}'[List registered repositories]' \
|
{-L,--list-repos}'[List registered repositories]' \
|
||||||
{-H,--list-hold-pkgs}'[List packages on hold state]' \
|
{-H,--list-hold-pkgs}'[List packages on hold state]' \
|
||||||
@ -138,6 +149,7 @@ _xbps_query() {
|
|||||||
{-o,--ownedby}'[Search for package files]:package file:_files' \
|
{-o,--ownedby}'[Search for package files]:package file:_files' \
|
||||||
{-S,--show}'[Show information]:package:_xbps_all_packages' \
|
{-S,--show}'[Show information]:package:_xbps_all_packages' \
|
||||||
{-s,--search}'[Search for packages]:search string: ' \
|
{-s,--search}'[Search for packages]:search string: ' \
|
||||||
|
--cat=-'[Print file from binpkg to stdout]:file name:_files:package:_xbps_all_packages' \
|
||||||
{-f,--files}'[Show package files]:package:_xbps_all_packages' \
|
{-f,--files}'[Show package files]:package:_xbps_all_packages' \
|
||||||
{-x,--deps}'[Show dependencies]:package:_xbps_all_packages' \
|
{-x,--deps}'[Show dependencies]:package:_xbps_all_packages' \
|
||||||
{-X,--revdeps}'[Show reverse dependencies]:package:_xbps_all_packages' \
|
{-X,--revdeps}'[Show reverse dependencies]:package:_xbps_all_packages' \
|
||||||
@ -150,6 +162,7 @@ _xbps_reconfigure() {
|
|||||||
$_xbps_common \
|
$_xbps_common \
|
||||||
{-a,--all}'[Process all packages]' \
|
{-a,--all}'[Process all packages]' \
|
||||||
{-f,--force}'[Force reconfiguration]' \
|
{-f,--force}'[Force reconfiguration]' \
|
||||||
|
'*'{-i,--ignore}'[Ignore package for reconfigure]:installed packages:_xbps_installed_packages' \
|
||||||
'*:installed packages:_xbps_installed_packages'
|
'*:installed packages:_xbps_installed_packages'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,7 +170,7 @@ _xbps_remove() {
|
|||||||
_arguments -s : \
|
_arguments -s : \
|
||||||
$_xbps_common \
|
$_xbps_common \
|
||||||
{-c,--cachedir=-}'[Full path to cachedir]:cache dir:_files -/' \
|
{-c,--cachedir=-}'[Full path to cachedir]:cache dir:_files -/' \
|
||||||
{-F,--force-revdeps}'[Force package removal even with revdeps]' \
|
{-F,--force-revdeps}'[Force package removal even with revdeps/unresolved shared libraries]' \
|
||||||
{-f,--force}'[Force package files removal]' \
|
{-f,--force}'[Force package files removal]' \
|
||||||
{-O,--clean-cache}'[Remove obsolete packages in cachedir]' \
|
{-O,--clean-cache}'[Remove obsolete packages in cachedir]' \
|
||||||
{-o,--remove-orphans}'[Remove package orphans]' \
|
{-o,--remove-orphans}'[Remove package orphans]' \
|
||||||
@ -168,12 +181,14 @@ _xbps_remove() {
|
|||||||
|
|
||||||
_xbps_rindex() {
|
_xbps_rindex() {
|
||||||
_arguments -s : \
|
_arguments -s : \
|
||||||
|
{-d,--debug}'[Debug mode shown to stderr]' \
|
||||||
{-f,--force}'[Force mode to overwrite entry in add mode]' \
|
{-f,--force}'[Force mode to overwrite entry in add mode]' \
|
||||||
{-h,--help}'[Print help usage]' \
|
{-h,--help}'[Print help usage]' \
|
||||||
{-v,--verbose}'[Verbose messages]' \
|
{-v,--verbose}'[Verbose messages]' \
|
||||||
{-V,--version}'[Show XBPS version]' \
|
{-V,--version}'[Show XBPS version]' \
|
||||||
'--privkey[Path to the private key for signing]:private key path:_files' \
|
'--privkey[Path to the private key for signing]:private key path:_files' \
|
||||||
'--signedby[Signature details]:signature details: ' \
|
'--signedby[Signature details]:signature details: ' \
|
||||||
|
- '(mode)' \
|
||||||
{-a,--add}'[Add package to repository index]' \
|
{-a,--add}'[Add package to repository index]' \
|
||||||
{-c,--clean}'[Clean repository index]' \
|
{-c,--clean}'[Clean repository index]' \
|
||||||
{-r,--remove-obsoletes}'[Removes obsolete packages from repository]' \
|
{-r,--remove-obsoletes}'[Removes obsolete packages from repository]' \
|
||||||
@ -187,6 +202,7 @@ _xbps_uchroot() {
|
|||||||
'-D[distdir]:distdir:_files -/' \
|
'-D[distdir]:distdir:_files -/' \
|
||||||
'-H[hostdir]:hostdir:_files -/' \
|
'-H[hostdir]:hostdir:_files -/' \
|
||||||
'-S[shmdir]:shmdir:_files -/' \
|
'-S[shmdir]:shmdir:_files -/' \
|
||||||
|
':chroot dir:_files -/' \
|
||||||
':command: _command_names -e' \
|
':command: _command_names -e' \
|
||||||
'*::arguments: _normal'
|
'*::arguments: _normal'
|
||||||
}
|
}
|
||||||
@ -202,12 +218,14 @@ _xbps_uhelper() {
|
|||||||
'*:: :->args' && ret=0
|
'*:: :->args' && ret=0
|
||||||
case $state in
|
case $state in
|
||||||
actions)
|
actions)
|
||||||
_values "actions" cmpver digest fetch getpkgdepname \
|
_values "actions" binpkgarch binpkgver cmpver digest fetch getpkgdepname \
|
||||||
getpkgname getpkgrevision getpkgversion \
|
getpkgname getpkgrevision getpkgversion \
|
||||||
pkgmatch version real-version
|
pkgmatch version real-version arch getsystemdir
|
||||||
ret=0;;
|
ret=0;;
|
||||||
args)
|
args)
|
||||||
case $words[1] in
|
case $words[1] in
|
||||||
|
binpkgarch) _arguments ':binpkg:' && ret=0;;
|
||||||
|
binpkgver) _arguments ':binpkg:' && ret=0;;
|
||||||
cmpver) _arguments ':installed version: ' ':required version: ' && ret=0;;
|
cmpver) _arguments ':installed version: ' ':required version: ' && ret=0;;
|
||||||
digest) _arguments '*:files:_files' && ret=0;;
|
digest) _arguments '*:files:_files' && ret=0;;
|
||||||
fetch) _arguments '*:urls: ' && ret=0;;
|
fetch) _arguments '*:urls: ' && ret=0;;
|
||||||
@ -218,6 +236,8 @@ _xbps_uhelper() {
|
|||||||
pkgmatch) _arguments ':version: ' ':pattern: ' && ret=0;;
|
pkgmatch) _arguments ':version: ' ':pattern: ' && ret=0;;
|
||||||
real-version) _arguments ':package:_xbps_installed_packages' && ret=0;;
|
real-version) _arguments ':package:_xbps_installed_packages' && ret=0;;
|
||||||
version) _arguments ':package:_xbps_installed_packages' && ret=0;;
|
version) _arguments ':package:_xbps_installed_packages' && ret=0;;
|
||||||
|
arch) ret=0;;
|
||||||
|
getsystemdir) ret=0;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -236,6 +256,7 @@ _xbps() {
|
|||||||
xbps-remove) _xbps_remove "$@";;
|
xbps-remove) _xbps_remove "$@";;
|
||||||
xbps-rindex) _xbps_rindex "$@";;
|
xbps-rindex) _xbps_rindex "$@";;
|
||||||
xbps-uchroot) _xbps_uchroot "$@";;
|
xbps-uchroot) _xbps_uchroot "$@";;
|
||||||
|
xbps-uunshare) _xbps_uchroot "$@";;
|
||||||
xbps-uhelper) _xbps_uhelper "$@";;
|
xbps-uhelper) _xbps_uhelper "$@";;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user