]> git.ipfire.org Git - thirdparty/util-linux.git/blob - bash-completion/script
rev: be careful with close()
[thirdparty/util-linux.git] / bash-completion / script
1 _script_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 '-c'|'--command')
9 compopt -o bashdefault
10 COMPREPLY=( $(compgen -c -- $cur) )
11 return 0
12 ;;
13 '-o'|'--output-limit')
14 COMPREPLY=( $(compgen -W "size" -- $cur) )
15 return 0
16 ;;
17 '-h'|'--help'|'-V'|'--version')
18 return 0
19 ;;
20 esac
21 case $cur in
22 '=')
23 cur=${cur#=}
24 ;;
25 -*)
26 OPTS="--append
27 --command
28 --return
29 --flush
30 --force
31 --quiet
32 --output-limit
33 --timing=
34 --version
35 --help"
36 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
37 return 0
38 ;;
39 esac
40 local IFS=$'\n'
41 compopt -o filenames
42 COMPREPLY=( $(compgen -f -- $cur) )
43 return 0
44 }
45 complete -F _script_module script