mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-10-06 20:33:09 +02:00
24 lines
601 B
Text
24 lines
601 B
Text
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
# 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
|
|
}
|
|
complete -F _update update
|