]> git.ipfire.org Git - thirdparty/util-linux.git/blob - bash-completion/swaplabel
setterm: disallow "default" for --ulcolor/--hbcolor
[thirdparty/util-linux.git] / bash-completion / swaplabel
1 _swaplabel_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 '-L'|'--label')
9 COMPREPLY=( $(compgen -W "label" -- $cur) )
10 return 0
11 ;;
12 '-U'|'--uuid')
13 COMPREPLY=( $(compgen -W '$(uuidgen)' -- $cur) )
14 return 0
15 ;;
16 '-h'|'--help'|'-V'|'--version')
17 return 0
18 ;;
19 esac
20 case $cur in
21 -*)
22 OPTS="--label --uuid --help --version"
23 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
24 return 0
25 ;;
26 esac
27 local IFS=$'\n'
28 compopt -o filenames
29 COMPREPLY=( $(compgen -f -- $cur) )
30 return 0
31 }
32 complete -F _swaplabel_module swaplabel