]> git.ipfire.org Git - thirdparty/util-linux.git/blob - bash-completion/waitpid
Merge branch 'wipefs/improvements' of https://github.com/t-8ch/util-linux
[thirdparty/util-linux.git] / bash-completion / waitpid
1 _waitpid_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 '-t'|'--timeout')
9 COMPREPLY=( $(compgen -W "seconds" -- $cur) )
10 return 0
11 ;;
12 '-c'|'--count')
13 return 0
14 ;;
15 '-h'|'--help'|'-V'|'--version')
16 return 0
17 ;;
18 esac
19 case $cur in
20 -*)
21 OPTS="--verbose
22 --timeout
23 --exited
24 --count
25 --help
26 --version"
27 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
28 return 0
29 ;;
30 *)
31 _pids
32 return 0
33 ;;
34 esac
35 return 0
36 }
37 complete -F _waitpid_module waitpid