]> git.ipfire.org Git - thirdparty/util-linux.git/blame - bash-completion/pg
Merge branch 'PR/dmesg-timestamps' of github.com:karelzak/util-linux-work
[thirdparty/util-linux.git] / bash-completion / pg
CommitLineData
c72fca2c
SK
1_pg_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 '-p')
9 COMPREPLY=( $(compgen -W "prompt" -- $cur) )
10 return 0
11 ;;
d4f9b8d7
VS
12 '-h'|'-V')
13 return 0
14 ;;
c72fca2c
SK
15 esac
16 case $cur in
17 -*)
18 OPTS="-number -c -e -f -n -p -r -s -h -V"
19 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
20 return 0
21 ;;
22 +*)
23 OPTS="+number +/pattern/"
24 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
25 return 0
26 ;;
27 esac
ce3e6b15 28 local IFS=$'\n'
c72fca2c
SK
29 compopt -o filenames
30 COMPREPLY=( $(compgen -f -- $cur) )
31 return 0
32}
33complete -F _pg_module pg