]> git.ipfire.org Git - thirdparty/util-linux.git/blob - bash-completion/more
blkzone: deny destructive ioctls on busy blockdev
[thirdparty/util-linux.git] / bash-completion / more
1 _more_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 '-n'|'--lines')
9 COMPREPLY=( $(compgen -W "number" -- $cur) )
10 return 0
11 ;;
12 '-h'|'--help'|'-V'|'--version')
13 return 0
14 ;;
15 esac
16 case $cur in
17 -*)
18 OPTS="
19 --silent
20 --logical
21 --no-pause
22 --print-over
23 --clean-print
24 --squeeze
25 --plain
26 --lines
27 --help
28 --version
29 "
30 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
31 return 0
32 ;;
33 +*)
34 OPTS="+number +/pattern"
35 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
36 return 0
37 ;;
38 esac
39
40 local IFS=$'\n'
41 compopt -o filenames
42 COMPREPLY=( $(compgen -f -- $cur) )
43 return 0
44 }
45 complete -F _more_module more