]> git.ipfire.org Git - thirdparty/util-linux.git/blame - bash-completion/chfn
bash-completion: Don't offer any more completions after help or version.
[thirdparty/util-linux.git] / bash-completion / chfn
CommitLineData
41e5a92c
SK
1_chfn_module()
2{
d4f9b8d7 3 local cur prev OPTS
41e5a92c
SK
4 COMPREPLY=()
5 cur="${COMP_WORDS[COMP_CWORD]}"
d4f9b8d7
VS
6 prev="${COMP_WORDS[COMP_CWORD-1]}"
7 case $prev in
8 '-u'|'--help'|'-v'|'--version')
9 return 0
10 ;;
11 esac
41e5a92c
SK
12 case $cur in
13 -*)
14 OPTS="-f --full-name -o --office -p --office-phone -h --home-phone -u --help -v --version"
15 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
16 return 0
17 ;;
18 esac
19 COMPREPLY=( $(compgen -u -- $cur) )
20 return 0
21}
22complete -F _chfn_module chfn