]> git.ipfire.org Git - thirdparty/util-linux.git/blame - bash-completion/script
su: use lib/pty-session.c code for --pty
[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
28 --return
29 --flush
30 --force
31 --quiet
aefe9893 32 --output-limit
0d5b9b8a
VS
33 --timing=
34 --version
35 --help"
8884f6d5
SK
36 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
37 return 0
38 ;;
39 esac
ce3e6b15 40 local IFS=$'\n'
8884f6d5
SK
41 compopt -o filenames
42 COMPREPLY=( $(compgen -f -- $cur) )
43 return 0
44}
45complete -F _script_module script