2014-11-18 17:52:23 +01:00
|
|
|
# _manjaro_tools_compgen() {
|
|
|
|
# local i r
|
|
|
|
# COMPREPLY=($(compgen -W '$*' -- "$cur"))
|
|
|
|
# for ((i=1; i < ${#COMP_WORDS[@]}-1; i++)); do
|
|
|
|
# for r in ${!COMPREPLY[@]}; do
|
|
|
|
# if [[ ${COMP_WORDS[i]} = ${COMPREPLY[r]} ]]; then
|
|
|
|
# unset 'COMPREPLY[r]'; break
|
|
|
|
# fi
|
|
|
|
# done
|
|
|
|
# done
|
|
|
|
# }
|
2014-11-13 17:59:10 +01:00
|
|
|
|
|
|
|
_mkchrootpkg() {
|
|
|
|
local cur
|
|
|
|
COMPREPLY=()
|
|
|
|
_get_comp_words_by_ref cur
|
|
|
|
|
|
|
|
case $cur in
|
|
|
|
-*)
|
|
|
|
COMPREPLY=( $( compgen -W '-I -c -h -l -r -u' -- "$cur" ) )
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
_filedir
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
true
|
|
|
|
} &&
|
|
|
|
complete -F _mkchrootpkg mkchrootpkg
|
|
|
|
|
|
|
|
_mkchroot() {
|
|
|
|
local cur
|
|
|
|
COMPREPLY=()
|
|
|
|
_get_comp_words_by_ref cur
|
|
|
|
|
|
|
|
case $cur in
|
|
|
|
-*)
|
|
|
|
COMPREPLY=( $( compgen -W '-C -M -S -c -h' -- "$cur" ) )
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
_filedir
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
true
|
|
|
|
} &&
|
|
|
|
complete -F _mkchroot mkchroot
|
|
|
|
|
2014-11-18 17:52:23 +01:00
|
|
|
_chroot_run() {
|
2014-11-13 17:59:10 +01:00
|
|
|
local cur
|
|
|
|
COMPREPLY=()
|
|
|
|
_get_comp_words_by_ref cur
|
|
|
|
|
|
|
|
case $cur in
|
|
|
|
-*)
|
|
|
|
COMPREPLY=( $( compgen -W '-C -M -S -c -h' -- "$cur" ) )
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
_filedir
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
true
|
|
|
|
} &&
|
2014-11-18 17:52:23 +01:00
|
|
|
complete -F _chroot_run chroot-run
|
2014-11-13 21:13:19 +01:00
|
|
|
|
2014-11-18 17:52:23 +01:00
|
|
|
_build_set() {
|
2014-11-13 21:13:19 +01:00
|
|
|
local cur
|
|
|
|
COMPREPLY=()
|
|
|
|
_get_comp_words_by_ref cur
|
|
|
|
|
|
|
|
case $cur in
|
|
|
|
-*)
|
|
|
|
COMPREPLY=( $( compgen -W '-a -b -p -c -r -w -s -h' -- "$cur" ) )
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
_filedir
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
true
|
|
|
|
} &&
|
2014-11-18 17:52:23 +01:00
|
|
|
complete -F _build_set build-set
|
2014-11-13 21:13:19 +01:00
|
|
|
|
|
|
|
|
2014-11-13 17:59:10 +01:00
|
|
|
# ex:et ts=2 sw=2 ft=sh
|