summaryrefslogtreecommitdiffstats
path: root/bash-completion/fdisk
diff options
context:
space:
mode:
Diffstat (limited to 'bash-completion/fdisk')
-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
;;