]> git.ipfire.org Git - thirdparty/util-linux.git/blame - bash-completion/script
bash-completion: update for new script tools
[thirdparty/util-linux.git] / bash-completion / script
CommitLineData
8884f6d5
SK
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 ;;
5feae697
SK
13 '-o'|'--output-limit')
14 COMPREPLY=( $(compgen -W "size" -- $cur) )
15 return 0
16 ;;
d4f9b8d7
VS
17 '-h'|'--help'|'-V'|'--version')
18 return 0
19 ;;
8884f6d5
SK
20 esac
21 case $cur in
22 '=')
23 cur=${cur#=}
24 ;;
25 -*)
0d5b9b8a
VS
26 OPTS="--append
27 --command
0faa7eda
KZ
28 --echo
29 --log-in
30 --log-out
31 --log-io
32 --log-timing
33 --logging-format
0d5b9b8a
VS
34 --return
35 --flush
36 --force
37 --quiet
aefe9893 38 --output-limit
0d5b9b8a
VS
39 --timing=
40 --version
41 --help"
8884f6d5
SK
42 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
43 return 0
44 ;;
45 esac
ce3e6b15 46 local IFS=$'\n'
8884f6d5
SK
47 compopt -o filenames
48 COMPREPLY=( $(compgen -f -- $cur) )
49 return 0
50}
51complete -F _script_module script