]> git.ipfire.org Git - thirdparty/util-linux.git/blob - bash-completion/fadvise
Merge branch 'lsfs--sockdiag-RW' of https://github.com/masatake/util-linux
[thirdparty/util-linux.git] / bash-completion / fadvise
1 _fadvise_module()
2 {
3 local cur prev ADVS OPTS
4 COMPREPLY=()
5 cur="${COMP_WORDS[COMP_CWORD]}"
6 prev="${COMP_WORDS[COMP_CWORD-1]}"
7 case $prev in
8 '-a'|'--advise')
9 ADVS='normal
10 sequential
11 random
12 noreuse
13 willneeded
14 dontneed'
15 COMPREPLY=( $(compgen -W "${ADVS[*]}" -- $cur) )
16 return 0
17 ;;
18 '-o'|'--offset'|'-l'|'--length')
19 COMPREPLY=( $(compgen -W "bytes" -- $cur) )
20 return 0
21 ;;
22 '-h'|'--help'|'-V'|'--version')
23 return 0
24 ;;
25 esac
26 case $cur in
27 -*)
28 OPTS='--advise
29 --length
30 --offset
31 --help
32 --versione'
33 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
34 return 0
35 ;;
36 esac
37 local IFS=$'\n'
38 compopt -o filenames
39 COMPREPLY=( $(compgen -f -- $cur) )
40 return 0
41 }
42 complete -F _fadvise_module fadvise