]> git.ipfire.org Git - thirdparty/util-linux.git/blob - bash-completion/script
bash-completion: update for new script tools
[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 --echo
29 --log-in
30 --log-out
31 --log-io
32 --log-timing
33 --logging-format
34 --return
35 --flush
36 --force
37 --quiet
38 --output-limit
39 --timing=
40 --version
41 --help"
42 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
43 return 0
44 ;;
45 esac
46 local IFS=$'\n'
47 compopt -o filenames
48 COMPREPLY=( $(compgen -f -- $cur) )
49 return 0
50 }
51 complete -F _script_module script