]> git.ipfire.org Git - thirdparty/util-linux.git/blame - bash-completion/fsck.cramfs
su: use lib/pty-session.c code for --pty
[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]}"
bf60993c 7 case $prev in
99d8ed0a
SK
8 '-b'|'--blocksize')
9 COMPREPLY=( $(compgen -W "size" -- $cur) )
10 return 0
11 ;;
12 '--extract')
ce3e6b15 13 local IFS=$'\n'
bf60993c
SK
14 compopt -o filenames
15 COMPREPLY=( $(compgen -o dirnames -- ${cur:-"/"}) )
16 return 0
17 ;;
d4f9b8d7
VS
18 '-h'|'--help'|'-V'|'--version')
19 return 0
20 ;;
bf60993c 21 esac
5f57e142
SK
22 case $cur in
23 -*)
24 COMPREPLY=( $(compgen -W "--verbose --blocksize --extract --help --version" -- $cur) )
25 return 0
26 ;;
27 esac
6ead91ce 28 compopt -o bashdefault -o default
559888c8 29 COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
bf60993c
SK
30 return 0
31}
32complete -F _fsck.cramfs_module fsck.cramfs