]>
Commit | Line | Data |
---|---|---|
c6f8c3f5 SK |
1 | _fallocate_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 | '-o'|'--offset'|'-l'|'--length') | |
9 | COMPREPLY=( $(compgen -W "bytes" -- $cur) ) | |
10 | return 0 | |
11 | ;; | |
d4f9b8d7 VS |
12 | '-h'|'--help'|'-V'|'--version') |
13 | return 0 | |
14 | ;; | |
c6f8c3f5 SK |
15 | esac |
16 | case $cur in | |
17 | -*) | |
d092911b SK |
18 | OPTS=" |
19 | --collapse-range | |
b8446f75 | 20 | --dig-holes |
d092911b | 21 | --insert-range |
b8446f75 | 22 | --length |
d092911b SK |
23 | --keep-size |
24 | --offset | |
25 | --punch-hole | |
26 | --zero-range | |
27 | --posix | |
b8446f75 | 28 | --verbose |
d092911b SK |
29 | --help |
30 | --version | |
31 | " | |
c6f8c3f5 SK |
32 | COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) ) |
33 | return 0 | |
34 | ;; | |
35 | esac | |
ce3e6b15 | 36 | local IFS=$'\n' |
c6f8c3f5 SK |
37 | compopt -o filenames |
38 | COMPREPLY=( $(compgen -f -- $cur) ) | |
39 | return 0 | |
40 | } | |
41 | complete -F _fallocate_module fallocate |