summaryrefslogtreecommitdiffstats
path: root/bash-completion
diff options
context:
space:
mode:
authorKarel Zak2014-06-25 13:41:27 +0200
committerKarel Zak2014-06-25 13:41:27 +0200
commit675821f4bd1fd46d3d375f4ca057c65cb51eebc3 (patch)
tree9cdfef5b3af872861f95427cabff3f1fb61f2437 /bash-completion
parentfdisk: add long options, cleanup man page and usage() (diff)
downloadkernel-qcow2-util-linux-675821f4bd1fd46d3d375f4ca057c65cb51eebc3.tar.gz
kernel-qcow2-util-linux-675821f4bd1fd46d3d375f4ca057c65cb51eebc3.tar.xz
kernel-qcow2-util-linux-675821f4bd1fd46d3d375f4ca057c65cb51eebc3.zip
bash-completion: update fdisk
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'bash-completion')
-rw-r--r--bash-completion/fdisk29
1 files changed, 22 insertions, 7 deletions
diff --git a/bash-completion/fdisk b/bash-completion/fdisk
index b800f8df2..28cdda622 100644
--- a/bash-completion/fdisk
+++ b/bash-completion/fdisk
@@ -5,7 +5,7 @@ _fdisk_module()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
- '-s')
+ '-s'|'--getsz')
local DEV TYPE DEVICES=''
while read DEV TYPE; do
[ $TYPE = 'part' ] && DEVICES+="$DEV "
@@ -13,29 +13,44 @@ _fdisk_module()
COMPREPLY=( $(compgen -W "$DEVICES" -- $cur) )
return 0
;;
- '-b')
+ '-b'|'--sector-size')
COMPREPLY=( $(compgen -W "512 1024 2048 4096" -- $cur) )
return 0
;;
- '-c')
+ '-c'|'--compatibility')
COMPREPLY=( $(compgen -W "dos nondos" -- $cur) )
return 0
;;
- '-u')
+ '-L'|'--color')
+ COMPREPLY=( $(compgen -W "auto never always" -- $cur) )
+ return 0
+ ;;
+ '-u'|'--units')
COMPREPLY=( $(compgen -W "cylinders sectors" -- $cur) )
return 0
;;
- '-C'|'-H'|'-S')
+ '-C'|'--geom-cylinders'|'-H'|'--geom-heads'|'-S'|'--geom-sectors')
COMPREPLY=( $(compgen -W "number" -- $cur) )
return 0
;;
- '-h'|'-v')
+ '-h'|'--help'|'-v'|'--version'|'-V'|'--list')
return 0
;;
esac
case $cur in
-*)
- OPTS="-l -s -b -c -h -u -v -C -H -S"
+ OPTS="--sector-size
+ --compatibility
+ --color
+ --list
+ --type
+ --units
+ --getsz
+ --geom-cylinders
+ --geom-heads
+ --geom-sectors
+ --help
+ --version"
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
return 0
;;