data/xbps.bash: add property completion.
This commit is contained in:
parent
567382c3a2
commit
ea88940b84
@ -41,6 +41,32 @@ _xbps_complete() {
|
|||||||
local common='-C|--config|-r|--rootdir'
|
local common='-C|--config|-r|--rootdir'
|
||||||
local morecommon="$common|-c|--cachedir"
|
local morecommon="$common|-c|--cachedir"
|
||||||
|
|
||||||
|
local modes='auto manual hold unhold'
|
||||||
|
local props='architecture
|
||||||
|
automatic-install
|
||||||
|
build-date
|
||||||
|
build-options
|
||||||
|
conflicts
|
||||||
|
homepage
|
||||||
|
install-date
|
||||||
|
install-script
|
||||||
|
installed_size
|
||||||
|
license
|
||||||
|
maintainer
|
||||||
|
metafile-sha256
|
||||||
|
packaged-with
|
||||||
|
pkgver
|
||||||
|
preserve
|
||||||
|
provides
|
||||||
|
remove-script
|
||||||
|
replaces
|
||||||
|
repository
|
||||||
|
shlib-provides
|
||||||
|
shlib-requires
|
||||||
|
short_desc
|
||||||
|
source-revisions
|
||||||
|
state'
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
xbps-dgraph)
|
xbps-dgraph)
|
||||||
if [[ $prev != @(-c|-o|-r) ]]; then
|
if [[ $prev != @(-c|-o|-r) ]]; then
|
||||||
@ -56,7 +82,7 @@ _xbps_complete() {
|
|||||||
;;
|
;;
|
||||||
xbps-pkgdb)
|
xbps-pkgdb)
|
||||||
if [[ $prev == @(-m|--mode) ]]; then
|
if [[ $prev == @(-m|--mode) ]]; then
|
||||||
COMPREPLY=( $( compgen -W 'auto manual hold unhold' -- "$cur") )
|
COMPREPLY=( $( compgen -W "$modes" -- "$cur") )
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [[ $prev != @($common) ]]; then
|
if [[ $prev != @($common) ]]; then
|
||||||
@ -65,6 +91,10 @@ _xbps_complete() {
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
xbps-query)
|
xbps-query)
|
||||||
|
if [[ $prev == @(-p|--property) ]]; then
|
||||||
|
COMPREPLY=( $( compgen -W "$props" -- "$cur") )
|
||||||
|
return
|
||||||
|
fi
|
||||||
if [[ $prev != @($morecommon|-p|--property|-o|--ownedby) ]]; then
|
if [[ $prev != @($morecommon|-p|--property|-o|--ownedby) ]]; then
|
||||||
_xbps_all_reply $cur
|
_xbps_all_reply $cur
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user