]>
Commit | Line | Data |
---|---|---|
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'|'--inodes') | |
9 | COMPREPLY=( $(compgen -W "inodes" -- $cur) ) | |
10 | return 0 | |
11 | ;; | |
12 | '-l'|'--badblocks') | |
13 | compopt -o filenames | |
14 | COMPREPLY=( $(compgen -f -- $cur) ) | |
15 | return 0 | |
16 | ;; | |
17 | '-n'|'--namelength') | |
18 | COMPREPLY=( $(compgen -W "14 30 60" -- $cur) ) | |
19 | return 0 | |
20 | ;; | |
21 | esac | |
22 | case $cur in | |
23 | -*) | |
24 | OPTS="--namelength --inodes --check --badblocks --help --version -1 -2 -3" | |
25 | COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) ) | |
26 | return 0 | |
27 | ;; | |
28 | esac | |
29 | compopt -o bashdefault -o default | |
30 | COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) ) | |
31 | return 0 | |
32 | } | |
33 | complete -F _mkfs.minix_module mkfs.minix |