]> git.ipfire.org Git - thirdparty/util-linux.git/blob - bash-completion/addpart
rev: be careful with close()
[thirdparty/util-linux.git] / bash-completion / addpart
1 _addpart_module()
2 {
3 local cur
4 COMPREPLY=()
5 cur="${COMP_WORDS[COMP_CWORD]}"
6 case $COMP_CWORD in
7 1)
8 OPTS="--help --version $(lsblk -pnro name)"
9 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
10 ;;
11 2)
12 # FIXME: how to determine next free partition number
13 ;;
14 3)
15 COMPREPLY=( $(compgen -W "start" -- $cur) )
16 ;;
17 4)
18 COMPREPLY=( $(compgen -W "length" -- $cur) )
19 ;;
20 esac
21 return 0
22 }
23 complete -F _addpart_module addpart