mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 11:30:37 +02:00
add tesuite completion
This commit is contained in:
parent
0e52da72b2
commit
392bb69a10
3 changed files with 43 additions and 19 deletions
|
@ -8,7 +8,7 @@ _usage () {
|
|||
echo "This will check binaries from package, if they exist"
|
||||
echo "and report missing to binary.log"
|
||||
echo ""
|
||||
echo -e "Usage: \e[1m\e${_BASENAME} <package>\e[m"
|
||||
echo -e "Usage: \e[1m${_BASENAME} <package>\e[m"
|
||||
exit 0
|
||||
}
|
||||
[[ -z "${1}" ]] && _usage
|
||||
|
|
24
usr/share/bash-completion/completions/testsuite
Normal file
24
usr/share/bash-completion/completions/testsuite
Normal file
|
@ -0,0 +1,24 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# created by Tobias Powalowski <tpowa@archlinux.org>
|
||||
_testsuite()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
run)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
*)
|
||||
OPTS="run"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
compopt -o bashdefault -o default
|
||||
return 0
|
||||
}
|
||||
complete -F _testsuite testsuite
|
|
@ -2,23 +2,23 @@
|
|||
# created by Tobias Powalowski <tpowa@archlinux.org>
|
||||
_update()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
-*)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
*)
|
||||
OPTS="$(update | rg '\-[a-z]' | choose 0 | sd '\x1B\[[0-9;]*[a-zA-Z]' '')"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
compopt -o bashdefault -o default
|
||||
return 0
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
-*)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
*)
|
||||
OPTS="$(update | rg '\-[a-z]' | choose 0 | sd '\x1B\[[0-9;]*[a-zA-Z]' '')"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
compopt -o bashdefault -o default
|
||||
return 0
|
||||
}
|
||||
complete -F _update update
|
||||
|
|
Loading…
Reference in a new issue