]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - bash-completion/partx
tests: remove device name from blkdiscard output
[thirdparty/util-linux.git] / bash-completion / partx
index 929000013c1f8f409e38cf67aee28a0c9c025c01..2430e40fec24a91564f9f0abfd36d580934fbc3d 100644 (file)
@@ -15,7 +15,7 @@ _partx_module()
                        prefix="${cur%$realcur}"
                        for WORD in $OUTPUT_ALL; do
                                if ! [[ $prefix == *"$WORD"* ]]; then
-                                       OUTPUT="$WORD $OUTPUT"
+                                       OUTPUT="$WORD ${OUTPUT:-""}"
                                fi
                        done
                        compopt -o nospace
@@ -45,6 +45,7 @@ _partx_module()
                                --noheadings
                                --nr
                                --output
+                               --output-all
                                --pairs
                                --raw
                                --sector-size
@@ -58,6 +59,7 @@ _partx_module()
                        return 0
                        ;;
        esac
+       compopt -o bashdefault -o default
        COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
        return 0
 }