diff options
author | Karel Zak | 2014-06-25 13:41:27 +0200 |
---|---|---|
committer | Karel Zak | 2014-06-25 13:41:27 +0200 |
commit | 675821f4bd1fd46d3d375f4ca057c65cb51eebc3 (patch) | |
tree | 9cdfef5b3af872861f95427cabff3f1fb61f2437 /bash-completion | |
parent | fdisk: add long options, cleanup man page and usage() (diff) | |
download | kernel-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/fdisk | 29 |
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 ;; |