]> git.ipfire.org Git - thirdparty/util-linux.git/blame - bash-completion/fsck
rev: be careful with close()
[thirdparty/util-linux.git] / bash-completion / fsck
CommitLineData
bf60993c
SK
1_fsck_module()
2{
5e3da11b 3 local cur prev OPTS
bf60993c
SK
4 COMPREPLY=()
5 cur="${COMP_WORDS[COMP_CWORD]}"
6 prev="${COMP_WORDS[COMP_CWORD-1]}"
7 case $prev in
8 '-b')
9 COMPREPLY=( $(compgen -W "superblock" -- $cur) )
10 return 0
11 ;;
12 '-B')
13 COMPREPLY=( $(compgen -W "blocksize" -- $cur) )
14 return 0
15 ;;
16 '-j')
17 COMPREPLY=( $(compgen -W "external_journal" -- $cur) )
18 return 0
19 ;;
20 '-l'|'-L')
21 COMPREPLY=( $(compgen -W "bad_blocks_file" -- $cur) )
22 return 0
23 ;;
d4f9b8d7
VS
24 '-?')
25 return 0
26 ;;
bf60993c
SK
27 esac
28 case $cur in
29 -*)
30 OPTS="-p -n -y -c -f -v -b -B -j -l -L"
31 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
32 return 0
33 ;;
34 esac
d22c1f53
KL
35 COMPREPLY=( $(compgen -W "$(find -L /dev/ -path /dev/fd -prune \
36 -o -type b -print 2>/dev/null)" -- $cur) )
bf60993c
SK
37 return 0
38}
39complete -F _fsck_module fsck