]> git.ipfire.org Git - thirdparty/util-linux.git/blame - bash-completion/column
Merge branch 'master' of https://github.com/biubiuzy/util-linux
[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
d3f21dca 8 '-c'|'--output-width'|'-l'|'--table-columns-limit')
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
d3f21dca 35 --table-columns-limit
82bbc77b
KZ
36 --table-noextreme
37 --table-noheadings
6be39224 38 --table-maxout
82bbc77b
KZ
39 --table-header-repeat
40 --table-hide
41 --table-right
42 --table-truncate
43 --table-wrap
f01e54d7 44 --keep-empty-lines
82bbc77b
KZ
45 --json
46 --tree
47 --tree-id
48 --tree-parent
49 --output-width
0d5b9b8a
VS
50 --separator
51 --output-separator
52 --fillrows
53 --help
54 --version"
c72fca2c
SK
55 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
56 return 0
57 ;;
58 esac
ce3e6b15 59 local IFS=$'\n'
c72fca2c
SK
60 compopt -o filenames
61 COMPREPLY=( $(compgen -f -- $cur) )
62 return 0
63}
64complete -F _column_module column