]> git.ipfire.org Git - thirdparty/util-linux.git/blame - bash-completion/mkfs.minix
bash-completion: Don't offer any more completions after help or version.
[thirdparty/util-linux.git] / bash-completion / mkfs.minix
CommitLineData
bf60993c
SK
1_mkfs.minix_module()
2{
3 local cur prev OPTS
4 COMPREPLY=()
5 cur="${COMP_WORDS[COMP_CWORD]}"
6 prev="${COMP_WORDS[COMP_CWORD-1]}"
7 case $prev in
8 '-i')
9 COMPREPLY=( $(compgen -W "inodes" -- $cur) )
10 return 0
11 ;;
12 '-l')
13 COMPREPLY=( $(compgen -W "badblocks-file" -- $cur) )
14 return 0
15 ;;
16 '-n')
17 COMPREPLY=( $(compgen -W "14 30" -- $cur) )
18 return 0
19 ;;
d4f9b8d7
VS
20 '-V'|'--version')
21 return 0
22 ;;
bf60993c
SK
23 esac
24 case $cur in
25 -*)
26 OPTS="-c -i -l -n -1 -2 -3"
27 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
28 return 0
29 ;;
30 esac
31 local DEVS
32 while read dev; do DEVS+="$dev " ; done < <(lsblk -pnro name)
33 COMPREPLY=( $(compgen -W "$DEVS" -- $cur) )
34 return 0
35}
36complete -F _mkfs.minix_module mkfs.minix