]> git.ipfire.org Git - thirdparty/util-linux.git/blame - bash-completion/uuidgen
rev: be careful with close()
[thirdparty/util-linux.git] / bash-completion / uuidgen
CommitLineData
76dceb10
SK
1_uuidgen_module()
2{
d4f9b8d7 3 local cur prev OPTS
76dceb10
SK
4 COMPREPLY=()
5 cur="${COMP_WORDS[COMP_CWORD]}"
d4f9b8d7
VS
6 prev="${COMP_WORDS[COMP_CWORD-1]}"
7 case $prev in
37a6cc7a
SK
8 '-n'|'--namespace')
9 COMPREPLY=( $(compgen -W "@dns @url @oid @x500 @x.500" -- "$cur") )
10 return 0
11 ;;
12 '-N'|'--name')
13 COMPREPLY=( $(compgen -W "name" -- "$cur") )
14 return 0
15 ;;
d4f9b8d7
VS
16 '-h'|'--help'|'-V'|'--version')
17 return 0
18 ;;
19 esac
76dceb10
SK
20 case $cur in
21 -*)
37a6cc7a
SK
22 OPTS="
23 --random
24 --time
25 --namespace
26 --name
27 --md5
28 --sha1
29 --hex
30 --help
31 --version
32 "
76dceb10
SK
33 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
34 return 0
35 ;;
36 esac
37 return 0
38}
39complete -F _uuidgen_module uuidgen