]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - bash-completion/blockdev
rev: be careful with close()
[thirdparty/util-linux.git] / bash-completion / blockdev
index 5889955626e2da0f7f3d323f99b63c201294d0ac..e7aca26de723c1a5a2bebfdbc3144969d3e6b6c2 100644 (file)
@@ -4,7 +4,7 @@ _blockdev_module()
        COMPREPLY=()
        cur="${COMP_WORDS[COMP_CWORD]}"
        prev="${COMP_WORDS[COMP_CWORD-1]}"
-       while read dev; do DEVS+="$dev " ; done < <(lsblk -pnro name)
+       DEVS="$(lsblk -pnro name)"
        OPTS="-h -V -q
                --report
                --getsz
@@ -19,6 +19,7 @@ _blockdev_module()
                --getalignoff
                --getmaxsect
                --getbsz
+               --setbsz
                --getsize64
                --setra
                --getra
@@ -28,7 +29,11 @@ _blockdev_module()
                --rereadpt
                $DEVS"
        case $prev in
-               '--setfra')
+               '--setbsz')
+                       COMPREPLY=( $(compgen -W "bytes" -- $cur) )
+                       return 0
+                       ;;
+               '--setra'|'--setfra')
                        COMPREPLY=( $(compgen -W "sectors" -- $cur) )
                        return 0
                        ;;