diff options
| author | Richard Maw <richard.maw@codethink.co.uk> | 2014-06-12 12:04:01 +0100 |
|---|---|---|
| committer | Richard Maw <richard.maw@codethink.co.uk> | 2014-06-12 12:04:01 +0100 |
| commit | c5c1033c5c7deda8abe3448ec81bbb33c72219e0 (patch) | |
| tree | 6e5cef29b85161eea8a7488a029f5a32f982c6ab /bash-completion/cfdisk | |
| parent | 462008f79be9e195670b202cb43827b8aeb1e60b (diff) | |
| parent | 2fb567c080e1762ec6a2147564f03068f55d4f14 (diff) | |
| download | util-linux-baserock/morph.tar.gz | |
Merge branch 'baserock/richardmaw/yakshave/util-linux-blkid' into baserock/morphbaserock/morph
Reviewed-by: Lars Wirzenius
Reviewed-by: Sam Thursfield
Diffstat (limited to 'bash-completion/cfdisk')
| -rw-r--r-- | bash-completion/cfdisk | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/bash-completion/cfdisk b/bash-completion/cfdisk index 6cd9d6f7e..6d900706a 100644 --- a/bash-completion/cfdisk +++ b/bash-completion/cfdisk @@ -5,25 +5,37 @@ _cfdisk_module() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" case $prev in - '-c') + '-c'|'--cylinders') COMPREPLY=( $(compgen -W "cylinders" -- $cur) ) return 0 ;; - '-h') + '-h'|'--heads') COMPREPLY=( $(compgen -W "heads" -- $cur) ) return 0 ;; - '-s') + '-s'|'--sectors') COMPREPLY=( $(compgen -W "sectors" -- $cur) ) return 0 ;; - '-v') + '-P'|'--print') + COMPREPLY=( $(compgen -W "r s t" -- $cur) ) + return 0 + ;; + '-v'|'-V'|'--version'|'--help') return 0 ;; esac case $cur in -*) - OPTS="-a -z -c -h -s" + OPTS=" --cylinders + --heads + --sectors + --guess + --print + --zero + --arrow + --help + --version" COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) ) return 0 ;; @@ -31,7 +43,7 @@ _cfdisk_module() local DEV TYPE DEVICES='' while read DEV TYPE; do [ $TYPE = 'disk' ] && DEVICES+="$DEV " - done < <(lsblk -pnro name,type) + done < <(lsblk -pnro "name,type") COMPREPLY=( $(compgen -W "$DEVICES" -- $cur) ) return 0 } |
