]> git.ipfire.org Git - thirdparty/util-linux.git/blob - bash-completion/fsck.cramfs
bash-completion: Don't offer any more completions after help or version.
[thirdparty/util-linux.git] / bash-completion / fsck.cramfs
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 ;;
14 '-h'|'--help'|'-V'|'--version')
15 return 0
16 ;;
17 esac
18 COMPREPLY=( $(compgen -W "${OPTS[*]}" -S ' ' -- $cur) )
19 return 0
20 }
21 complete -F _fsck.cramfs_module fsck.cramfs