diff options
author | Gabriel F. T. Gomes <gabriel@inconstante.net.br> | 2019-08-07 09:17:13 -0300 |
---|---|---|
committer | Gabriel F. T. Gomes <gabriel@inconstante.net.br> | 2019-08-07 09:17:13 -0300 |
commit | 5732da2af736c40cf693354485446ab4867ecb4d (patch) | |
tree | 76d76cdfa16ca62d20fb109da13895ec64fff110 /completions/cryptsetup | |
parent | 9cd22d1df8f0f5b554858471c86faa9f37b8fed4 (diff) | |
download | bash-completion-5732da2af736c40cf693354485446ab4867ecb4d.tar.gz |
New upstream version 2.9upstream/2.9
Diffstat (limited to 'completions/cryptsetup')
-rw-r--r-- | completions/cryptsetup | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/completions/cryptsetup b/completions/cryptsetup index 570b27ef..f8be116f 100644 --- a/completions/cryptsetup +++ b/completions/cryptsetup @@ -2,8 +2,7 @@ _cryptsetup_name() { - COMPREPLY=( $( compgen -X control -W '$( command ls /dev/mapper )' \ - -- "$cur" ) ) + COMPREPLY=( $(compgen -X control -W '$(command ls /dev/mapper)' -- "$cur") ) } _cryptsetup_device() @@ -18,10 +17,18 @@ _cryptsetup() _init_completion -s || return case $prev in - --key-file|--master-key-file|--header-backup-file|-d) + --help|--version|--cipher|--hash|--*-size|--key-slot|--size|--offset|\ + --skip|--iter-time|--timeout|--tries|-!(-*)[chslSbopitT]) + return + ;; + --key-file|--master-key-file|--header-backup-file|-!(-*)d) _filedir return ;; + --type|-!(-*)M) + COMPREPLY=( $(compgen -W "luks plain loopaes tcrypt" -- "$cur") ) + return + ;; esac $split && return @@ -30,17 +37,16 @@ _cryptsetup() _get_first_arg if [[ -z $arg ]]; then if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) ) + COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "$cur") ) [[ $COMPREPLY == *= ]] && compopt -o nospace else - COMPREPLY=( $( compgen -W 'open close resize status benchmark + COMPREPLY=( $(compgen -W 'open close resize status benchmark repair erase luksFormat luksAddKey luksRemoveKey luksChangeKey luksKillSlot luksUUID isLuks luksDump tcryptDump luksSuspend - luksResume luksHeaderBackup luksHeaderRestore' -- "$cur" ) ) + luksResume luksHeaderBackup luksHeaderRestore' -- "$cur") ) fi else - local args - _count_args + local args; _count_args "" "-!(-*)[chslSbopitTdM]" case $arg in open|create|luksOpen|loopaesOpen|tcryptOpen) case $args in |