]> git.ipfire.org Git - thirdparty/util-linux.git/blob - bash-completion/fallocate
bash-completion: update fallocate, fstrim and lsblk
[thirdparty/util-linux.git] / bash-completion / fallocate
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 ;;
12 '-h'|'--help'|'-V'|'--version')
13 return 0
14 ;;
15 esac
16 case $cur in
17 -*)
18 OPTS="--keep-size
19 --punch-hole
20 --dig-holes
21 --offset
22 --length
23 --help
24 --verbose
25 --version"
26 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
27 return 0
28 ;;
29 esac
30 local IFS=$'\n'
31 compopt -o filenames
32 COMPREPLY=( $(compgen -f -- $cur) )
33 return 0
34 }
35 complete -F _fallocate_module fallocate