]> git.ipfire.org Git - thirdparty/util-linux.git/blame - bash-completion/more
lsclocks: new util to interact with system clocks
[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
e3cb27f5
SK
8 '-n'|'--lines')
9 COMPREPLY=( $(compgen -W "number" -- $cur) )
10 return 0
11 ;;
12 '-h'|'--help'|'-V'|'--version')
d4f9b8d7
VS
13 return 0
14 ;;
15 esac
c72fca2c
SK
16 case $cur in
17 -*)
e3cb27f5
SK
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 "
c72fca2c
SK
30 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
31 return 0
32 ;;
33 +*)
e3cb27f5 34 OPTS="+number +/pattern"
c72fca2c
SK
35 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
36 return 0
37 ;;
38 esac
ce3e6b15
KZ
39
40 local IFS=$'\n'
c72fca2c
SK
41 compopt -o filenames
42 COMPREPLY=( $(compgen -f -- $cur) )
43 return 0
44}
45complete -F _more_module more