Debian Codegraph @

bash-completion/blockdev

raw
1 _blockdev_module()
2 {
3 local cur prev OPTS
4 COMPREPLY=()
5 cur="${COMP_WORDS[COMP_CWORD]}"
6 prev="${COMP_WORDS[COMP_CWORD-1]}"
7 DEVS="$(command lsblk -pnro name)"
8 OPTS="-h -V -q
9 --report
10 --getsz
11 --setro
12 --setrw
13 --getro
14 --getdiscardzeroes
15 --getdiskseq
16 --getzonesz
17 --getss
18 --getpbsz
19 --getiomin
20 --getioopt
21 --getalignoff
22 --getmaxsect
23 --getbsz
24 --setbsz
25 --getsize64
26 --setra
27 --getra
28 --setfra
29 --getfra
30 --flushbufs
31 --rereadpt
32 $DEVS
33 --help
34 --version"
35 case $prev in
36 '--setbsz')
37 COMPREPLY=( $(compgen -W "bytes" -- $cur) )
38 return 0
39 ;;
40 '--setra'|'--setfra')
41 COMPREPLY=( $(compgen -W "sectors" -- $cur) )
42 return 0
43 ;;
44 esac
45 compopt -o bashdefault -o default
46 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
47 return 0
48 }
49 complete -F _blockdev_module blockdev