]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - bash-completion/fdisk
bash-completion: update disk-utils
[thirdparty/util-linux.git] / bash-completion / fdisk
index 0ba522ee488f3c0fddf3ba4c056161f5ac53e986..ef6c5beb4b0e0ce879486ea0fb26ee5e7406859d 100644 (file)
@@ -21,11 +21,46 @@ _fdisk_module()
                        COMPREPLY=( $(compgen -W "auto never always" -- $cur) )
                        return 0
                        ;;
+               '--output')
+                       local prefix realcur OUTPUT_ALL OUTPUT
+                       realcur="${cur##*,}"
+                       prefix="${cur%$realcur}"
+                       OUTPUT_ALL="
+                               Attrs
+                               Boot
+                               Bsize
+                               Cpg
+                               Cylinders
+                               Device
+                               End
+                               End-C/H/S
+                               Flags
+                               Fsize
+                               Id
+                               Name
+                               Sectors
+                               Size
+                               Slice
+                               Start
+                               Start-C/H/S
+                               Type
+                               Type-UUID
+                               UUID
+                       "
+                       for WORD in $OUTPUT_ALL; do
+                               if ! [[ $prefix == *"$WORD"* ]]; then
+                                       OUTPUT="$WORD $OUTPUT"
+                               fi
+                       done
+                       compopt -o nospace
+                       COMPREPLY=( $(compgen -P "$prefix" -W "$OUTPUT" -S ',' -- "$realcur") )
+                       return 0
+                       ;;
                '-u'|'--units')
                        COMPREPLY=( $(compgen -W "cylinders sectors" -- $cur) )
                        return 0
                        ;;
-               '-C'|'--geom-cylinders'|'-H'|'--geom-heads'|'-S'|'--geom-sectors')
+               '-C'|'--cylinders'|'-H'|'--heads'|'-S'|'--sectors')
                        COMPREPLY=( $(compgen -W "number" -- $cur) )
                        return 0
                        ;;
@@ -40,12 +75,16 @@ _fdisk_module()
                                --compatibility
                                --color
                                --list
+                               --output
                                --type
                                --units
                                --getsz
-                               --geom-cylinders
-                               --geom-heads
-                               --geom-sectors
+                               --bytes
+                               --wipe
+                               --wipe-partitions
+                               --cylinders
+                               --heads
+                               --sectors
                                --help
                                --version"
                        COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )