]> git.ipfire.org Git - thirdparty/util-linux.git/blob - bash-completion/fsck
rev: be careful with close()
[thirdparty/util-linux.git] / bash-completion / fsck
1 _fsck_module()
2 {
3 local cur prev OPTS
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 ;;
24 '-?')
25 return 0
26 ;;
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
35 COMPREPLY=( $(compgen -W "$(find -L /dev/ -path /dev/fd -prune \
36 -o -type b -print 2>/dev/null)" -- $cur) )
37 return 0
38 }
39 complete -F _fsck_module fsck