first upload
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
# bash completion for miaur
|
||||
_miaur() {
|
||||
local cur prev
|
||||
COMPREPLY=()
|
||||
cur=${COMP_WORDS[COMP_CWORD]}
|
||||
prev=${COMP_WORDS[COMP_CWORD - 1]}
|
||||
|
||||
local ops='-S -Syu -Sua -Ss -Si -Sc -Q -Qua -Qm -R -Rns -G -Gp -B -Bi -h -V'
|
||||
local longs='--aur --repo --skipreview --cleanafter --removemake --noremovermake --bottomup --topdown --clonedir --mflags --sudoloop --nosudoloop --help --version'
|
||||
|
||||
case "$prev" in
|
||||
-S | -Si | -Ss | -G | -Gp | -R | -Rns | -Qi)
|
||||
COMPREPLY=($(compgen -W "$(pacman -Ssq "^${cur}" 2>/dev/null | head -50)" -- "$cur"))
|
||||
return
|
||||
;;
|
||||
--clonedir)
|
||||
COMPREPLY=($(compgen -d -- "$cur"))
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ $cur == -* ]]; then
|
||||
COMPREPLY=($(compgen -W "$ops $longs" -- "$cur"))
|
||||
else
|
||||
COMPREPLY=($(compgen -W "$(pacman -Ssq "^${cur}" 2>/dev/null | head -40)" -- "$cur"))
|
||||
fi
|
||||
}
|
||||
complete -F _miaur miaur
|
||||
@@ -0,0 +1,27 @@
|
||||
#compdef miaur
|
||||
|
||||
_miaur() {
|
||||
local -a ops
|
||||
ops=(
|
||||
'-Syu:upgrade repository and AUR packages'
|
||||
'-Sua:upgrade AUR packages only'
|
||||
'-Ss:search packages'
|
||||
'-Si:show package information'
|
||||
'-S:install a package'
|
||||
'-Qua:list AUR upgrades'
|
||||
'-G:download a PKGBUILD'
|
||||
'-Gp:print a PKGBUILD'
|
||||
'-Bi:build and install'
|
||||
'-Sc:clean caches'
|
||||
'-Rns:remove a package'
|
||||
'--aur:use the AUR only'
|
||||
'--repo:use repositories only'
|
||||
'--skipreview:skip PKGBUILD review'
|
||||
'--bottomup:show AUR results first'
|
||||
'--help:show help'
|
||||
)
|
||||
_arguments '*:package:_files' \
|
||||
"${ops[@]}"
|
||||
}
|
||||
|
||||
_miaur
|
||||
Reference in New Issue
Block a user