]> git.ipfire.org Git - thirdparty/util-linux.git/blame - bash-completion/column
rev: be careful with close()
[thirdparty/util-linux.git] / bash-completion / column
CommitLineData
c72fca2c
SK
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
82bbc77b 8 '-c'|'--output-width')
c72fca2c
SK
9 COMPREPLY=( $(compgen -W "number" -- $cur) )
10 return 0
11 ;;
82bbc77b
KZ
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')
c72fca2c
SK
21 COMPREPLY=( $(compgen -W "string" -- $cur) )
22 return 0
23 ;;
d4f9b8d7
VS
24 '-h'|'--help'|'-V'|'--version')
25 return 0
26 ;;
c72fca2c
SK
27 esac
28 case $cur in
29 -*)
0d5b9b8a
VS
30 OPTS="--columns
31 --table
82bbc77b
KZ
32 --table-name
33 --table-order
34 --table-columns
35 --table-noextreme
36 --table-noheadings
37 --table-header-repeat
38 --table-hide
39 --table-right
40 --table-truncate
41 --table-wrap
42 --table-empty-lines
43 --json
44 --tree
45 --tree-id
46 --tree-parent
47 --output-width
0d5b9b8a
VS
48 --separator
49 --output-separator
50 --fillrows
51 --help
52 --version"
c72fca2c
SK
53 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
54 return 0
55 ;;
56 esac
ce3e6b15 57 local IFS=$'\n'
c72fca2c
SK
58 compopt -o filenames
59 COMPREPLY=( $(compgen -f -- $cur) )
60 return 0
61}
62complete -F _column_module column