]> git.ipfire.org Git - thirdparty/util-linux.git/blame - bash-completion/more
rev: be careful with close()
[thirdparty/util-linux.git] / bash-completion / more
CommitLineData
c72fca2c
SK
1_more_module()
2{
d4f9b8d7 3 local cur prev OPTS
c72fca2c
SK
4 COMPREPLY=()
5 cur="${COMP_WORDS[COMP_CWORD]}"
d4f9b8d7
VS
6 prev="${COMP_WORDS[COMP_CWORD-1]}"
7 case $prev in
8 '-V')
9 return 0
10 ;;
11 esac
c72fca2c
SK
12 case $cur in
13 -*)
14 OPTS="-d -f -l -p -c -u -s -number -V"
15 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
16 return 0
17 ;;
18 +*)
19 OPTS="+number +/string"
20 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
21 return 0
22 ;;
23 esac
ce3e6b15
KZ
24
25 local IFS=$'\n'
c72fca2c
SK
26 compopt -o filenames
27 COMPREPLY=( $(compgen -f -- $cur) )
28 return 0
29}
30complete -F _more_module more