diff options
author | Manuel Bentele | 2019-08-14 20:59:14 +0200 |
---|---|---|
committer | Manuel Bentele | 2019-08-14 20:59:14 +0200 |
commit | 57ca13624ed064eadb18c010d478d13049f78cce (patch) | |
tree | f5259f38e74a4fd6e947c813a9efa535e2099378 | |
parent | lib/losetup: added test for file format option (diff) | |
download | kernel-qcow2-util-linux-57ca13624ed064eadb18c010d478d13049f78cce.tar.gz kernel-qcow2-util-linux-57ca13624ed064eadb18c010d478d13049f78cce.tar.xz kernel-qcow2-util-linux-57ca13624ed064eadb18c010d478d13049f78cce.zip |
losetup: extended bash-completion to support file formats
The bash-completion is extended to support the file format option for loop
devices of losetup.
Signed-off-by: Manuel Bentele <development@manuel-bentele.de>
-rw-r--r-- | bash-completion/losetup | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bash-completion/losetup b/bash-completion/losetup index d20726533..e085abe28 100644 --- a/bash-completion/losetup +++ b/bash-completion/losetup @@ -24,12 +24,17 @@ _losetup_module() COMPREPLY=( $(compgen -W "number" -- $cur) ) return 0 ;; + '-t'|'--type') + ARG="RAW QCOW VDI VMDK" + COMPREPLY=( $(compgen -W "$ARG" -- $cur) ) + return 0 + ;; '-O'|'--output') local prefix realcur OUTPUT_ALL OUTPUT realcur="${cur##*,}" prefix="${cur%$realcur}" OUTPUT_ALL="NAME AUTOCLEAR BACK-FILE BACK-INO - BACK-MAJ:MIN MAJ:MIN OFFSET PARTSCAN RO + BACK-MAJ:MIN FILE-FORMAT MAJ:MIN OFFSET PARTSCAN RO SIZELIMIT DIO" for WORD in $OUTPUT_ALL; do if ! [[ $prefix == *"$WORD"* ]]; then @@ -58,6 +63,7 @@ _losetup_module() --partscan --read-only --show + --type --verbose --json --list |