]> git.ipfire.org Git - thirdparty/util-linux.git/blob - bash-completion/column
Merge branch 'logger-wrong-typo' of https://github.com/chentooerl/util-linux
[thirdparty/util-linux.git] / bash-completion / column
1 _column_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'|'--output-width'|'-l'|'--table-columns-limit')
9 COMPREPLY=( $(compgen -W "number" -- $cur) )
10 return 0
11 ;;
12 '-s'|'--separator'|'-o'|'--output-separator'|'-n'|'--table-name'|'-O')
13 COMPREPLY=( $(compgen -W "string" -- $cur) )
14 return 0
15 ;;
16 '-O'|'--table-order'|'-N'|'--table-columns'|'-E'|'--table-noextreme'|'-H'|'--table-hide'|'-R'|'--table-right'|'-T'|'--table-truncate'|'-W'|'--table-wrap')
17 COMPREPLY=( $(compgen -W "string" -- $cur) )
18 return 0
19 ;;
20 '-r'|'--tree'|'-i'|'--tree-id'|'-p'|'--tree-parent')
21 COMPREPLY=( $(compgen -W "string" -- $cur) )
22 return 0
23 ;;
24 '-h'|'--help'|'-V'|'--version')
25 return 0
26 ;;
27 esac
28 case $cur in
29 -*)
30 OPTS="--columns
31 --table
32 --table-name
33 --table-order
34 --table-columns
35 --table-columns-limit
36 --table-noextreme
37 --table-noheadings
38 --table-maxout
39 --table-header-repeat
40 --table-hide
41 --table-right
42 --table-truncate
43 --table-wrap
44 --keep-empty-lines
45 --json
46 --tree
47 --tree-id
48 --tree-parent
49 --output-width
50 --separator
51 --output-separator
52 --fillrows
53 --help
54 --version"
55 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
56 return 0
57 ;;
58 esac
59 local IFS=$'\n'
60 compopt -o filenames
61 COMPREPLY=( $(compgen -f -- $cur) )
62 return 0
63 }
64 complete -F _column_module column