]> git.ipfire.org Git - thirdparty/util-linux.git/blob - bash-completion/blockdev
lsfd: (po-man) update po4a.cfg
[thirdparty/util-linux.git] / bash-completion / blockdev
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="$(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 case $prev in
34 '--setbsz')
35 COMPREPLY=( $(compgen -W "bytes" -- $cur) )
36 return 0
37 ;;
38 '--setra'|'--setfra')
39 COMPREPLY=( $(compgen -W "sectors" -- $cur) )
40 return 0
41 ;;
42 esac
43 compopt -o bashdefault -o default
44 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
45 return 0
46 }
47 complete -F _blockdev_module blockdev