1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-20 13:50:12 +01:00

New aliased completion: fdroid checkupdates -p

This commit is contained in:
Daniel Martí 2013-09-06 22:51:04 +02:00
parent fed04a0429
commit e966634bc0

View File

@ -13,10 +13,15 @@
# alias fbuild='fdroid build'
# complete -F _fdroid_build fbuild
#
# There's also a completion function made for aliases to 'fdroid build -p':
# There are also completion function for '-p com.some.app' aliases:
#
# alias fbld='fdroid build -p'
# alias fbld='fdroid build -v -l -p'
# complete -F _fdroid_build_project fbld
#
# alias fcheckup='fdroid checkupdates -v -p'
# complete -F _fdroid_checkupdates_project fcheckup
#
# This way, one can simply do 'fbld com.some.app' or 'fcheckup com.some.app'
__package() {
[[ -d ./metadata ]] || return 0
@ -197,6 +202,15 @@ _fdroid_build_project() {
__complete_build
}
_fdroid_checkupdates_project() {
local cur prev cmds opts lopts aliased
__fdroid_init
aliased=true
(( $COMP_CWORD == 1 )) && prev="-p"
__complete_checkupdates
}
complete -F _fdroid fdroid
return 0