]> git.ipfire.org Git - thirdparty/util-linux.git/blame - bash-completion/fsck.cramfs
bash-completion: Don't offer any more completions after help or version.
[thirdparty/util-linux.git] / bash-completion / fsck.cramfs
CommitLineData
bf60993c
SK
1_fsck.cramfs_module()
2{
3 local cur prev OPTS
4 COMPREPLY=()
5 cur="${COMP_WORDS[COMP_CWORD]}"
6 prev="${COMP_WORDS[COMP_CWORD-1]}"
7 OPTS='-v --verbose -x --destination -h --help -V --version file'
8 case $prev in
9 '-x'|'--destination')
10 compopt -o filenames
11 COMPREPLY=( $(compgen -o dirnames -- ${cur:-"/"}) )
12 return 0
13 ;;
d4f9b8d7
VS
14 '-h'|'--help'|'-V'|'--version')
15 return 0
16 ;;
bf60993c
SK
17 esac
18 COMPREPLY=( $(compgen -W "${OPTS[*]}" -S ' ' -- $cur) )
19 return 0
20}
21complete -F _fsck.cramfs_module fsck.cramfs