2013-03-22 18:37:11 -05:00
|
|
|
_addpart_module()
|
|
|
|
{
|
2015-06-02 12:59:03 -05:00
|
|
|
local cur
|
2013-03-22 18:37:11 -05:00
|
|
|
COMPREPLY=()
|
|
|
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
|
|
|
case $COMP_CWORD in
|
|
|
|
1)
|
2014-10-26 17:07:08 -05:00
|
|
|
OPTS="--help --version $(lsblk -pnro name)"
|
2019-09-19 08:45:54 -05:00
|
|
|
compopt -o bashdefault -o default
|
2013-03-22 18:37:11 -05:00
|
|
|
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
|
|
|
;;
|
|
|
|
2)
|
|
|
|
# FIXME: how to determine next free partition number
|
|
|
|
;;
|
|
|
|
3)
|
|
|
|
COMPREPLY=( $(compgen -W "start" -- $cur) )
|
|
|
|
;;
|
|
|
|
4)
|
|
|
|
COMPREPLY=( $(compgen -W "length" -- $cur) )
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
complete -F _addpart_module addpart
|