From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19708 invoked by alias); 18 Sep 2017 14:38:23 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 41726 Received: (qmail 15792 invoked by uid 1010); 18 Sep 2017 14:38:23 -0000 X-Qmail-Scanner-Diagnostics: from sonic309-24.consmr.mail.ir2.yahoo.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(77.238.179.82):SA:0(-4.7/5.0):. Processed in 3.64035 secs); 18 Sep 2017 14:38:23 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: okiddle@yahoo.co.uk X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1505745494; bh=p180ELr+3bcDmH7P+TqNw7NUWbFm4p2J1gZAQwCNxRk=; h=From:To:Subject:Date:From:Subject; b=WOsxyPMM23qyW27my7OnIr2FT3R6z6wwICfRL9AzfSrFGVi0nYY6Uac45UVsWSo7zc1wkrkXIBTDmX6CsnP6/H9fm37Mz2EhGC9VN1bkQGoql15OWoqNN8YQ+M5szQPPKHWYKqLTMKdUnI9NZLksm7o4wONz2KZk3fQOPU7fxoWeA7tElcTdDq544qiensxSGm448al3wQx+nC+q+2+OR+fx3FUMpYSwjoQcRJkhGZhWuWEjFQQ3Nga6pZe5Z/ya3afgBXzleISJ0My3RyMS7rcd4tG0xPZD8EKmKQN6JzwXQ2S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SrFJz6ESNMi1dC76GeQqs2XjKGJLStINQ6n4.4JHqrmLstkcPIz.Yz3LRp oVABUC8iHBSNpzVe4jIP3tWnwwmvOCZAPRHi1Cl6EGqduFQ-- X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- From: Oliver Kiddle To: Zsh workers Subject: PATCH: cryptsetup completion MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2554.1505745129.1@thecus.kiddle.eu> Date: Mon, 18 Sep 2017 16:32:09 +0200 Message-ID: <2555.1505745129@thecus.kiddle.eu> cryptsetup completion option specs were missing + and = suffixes. This also updates options to cryptsetup 1.7.5. Oliver diff --git a/Completion/Linux/Command/_cryptsetup b/Completion/Linux/Command/_cryptsetup index 0e7a5d37e..00b0f2f95 100644 --- a/Completion/Linux/Command/_cryptsetup +++ b/Completion/Linux/Command/_cryptsetup @@ -3,47 +3,63 @@ local curcontext="$curcontext" ret=1 local -a actions state line expl -_arguments \ +_arguments -s \ '(-v --verbose)'{-v,--verbose}'[enable verbose mode]' \ '--debug[enable debug mode]' \ - '(-h --hash)'{-h,--hash}'[hash algorithm]:hash algorithm' \ - '(-c --cipher)'{-c,--cipher}'[set cipher]:cipher specification' \ + '(-c --cipher)'{-c+,--cipher=}'[set cipher]:cipher specification' \ + '(-h --hash)'{-h+,--hash=}'[hash algorithm]:hash algorithm' \ '(-y --verify-passphrase)'{-y,--verify-passphrase}'[query for password twice]' \ - '(-d --key-file)'{-d,--key-file}'[set keyfile]:key file:_files' \ - '(-l --keyfile-size)'{-l,--keyfile-size}'[set keyfile size]:size (bytes)' \ - '--new-keyfile-size[set new keyfile size (luksAddKey)]:size (bytes)' \ - '--master-key-file[set master key]:key file:_files' \ + '(-d --key-file)'{-d+,--key-file=}'[set keyfile]:key file:_files' \ + '--master-key-file=[set master key]:key file:_files' \ '--dump-master-key[dump luks master key]' \ + '(-s --key-size)'{-s+,--key-size=}'[set key size]:size (bits)' \ + '(-l --keyfile-size)'{-l+,--keyfile-size=}'[set keyfile size]:size (bytes)' \ + '--keyfile-offset=[specify number of bytes to skip in keyfile]:offset (bytes)' \ + '--new-keyfile-size=[set new keyfile size (luksAddKey)]:size (bytes)' \ + '--new-keyfile-offset=[specify number of bytes to skip in newly added keyfile]:offset (bytes)' \ + '(-S --key-slot)'{-S+,--key-slot=}'[select key slot]:key slot' \ + '(-b --size)'{-b+,--size=}'[force device size]:sectors' \ + '(-o --offset)'{-o+,--offset=}'[set start offset]:sectors' \ + '(-p --skip)'{-p+,--skip=}'[data to skip at beginning]:sectors' \ + '(-r --readonly)'{-r,--readonly}'[create a read-only mapping]' \ + '(-i --iter-time)'{-i+,--iter-time=}'[set password processing duration]:duration (milliseconds)' \ + '(-q --batch-mode)'{-q,--batch-mode}"[don't ask for confirmation]" \ + '(-t --timeout)'{-t+,--timeout=}'[set password prompt timeout]:timeout (seconds)' \ + '(-T --tries)'{-T+,--tries=}'[set maximum number of retries]:number of retries' \ + '--align-payload=[set payload alignment]:sectors' \ + '--header-backup-file=[specify file with LUKS header and keyslots backup]:file:_files' \ '(--use-urandom)--use-random[use /dev/random to generate volume key]' \ '(--use-random)--use-urandom[use /dev/urandom to generate volume key]' \ - '(-S --key-slot)'{-S,--key-slot}'[select key slot]:key slot' \ - '(-s --key-size)'{-s,--key-size}'[set key size]:size (bits)' \ - '(-b --size)'{-b,--size}'[force device size]:sectors' \ - '(-o --offset)'{-o,--offset}'[set start offset]:sectors' \ - '(-p --skip)'{-p,--skip}'[data to skip at beginning]:sectors' \ - '--readonly[set up read-only mapping]' \ - '(-i --iter-time)'{-i,--iter-time}'[set password processing duration]:duration (milliseconds)' \ - '(-q --batch-mode)'{-q,--batch-mode}'[do not ask for confirmation]' \ - '(-t --timeout)'{-t,--timeout}'[set password prompt timeout]:timeout (seconds)' \ - '(-T --tries)'{-T,--tries}'[set maximum number of retries]:number of retries' \ - '--align-payload[set payload alignment]:sectors' \ - '--uuid[set device UUID]:uuid' \ + '--shared[share device with another non-overlapping crypt segment]' \ + '--uuid=[set device UUID]:uuid' \ + '--allow-discards[allow discards (aka TRIM) requests for device]' \ + '--header=[device or file with separated LUKS header]:file:_files' \ + '--test-passphrase[do not activate device, just check passphrase]' \ + '--tcrypt-hidden[use hidden header (hidden TCRYPT device)]' \ + '--tcrypt-system[device is system TCRYPT drive (with bootloader)]' \ + '--tcrypt-backup[use backup (secondary) TCRYPT header]' \ + '--veracrypt[scan also for VeraCrypt compatible device]' \ + '(-M --type)'{-M+,--type=}'[specify type of device metadata]:type:(luks plain loopaes tcrypt)' \ + '--force-password[disable password quality check (if enabled)]' \ + '--perf-same_cpu_crypt[use dm-crypt same_cpu_crypt performance compatibility option]' \ + '--perf-submit_from_crypt_cpus[use dm-crypt submit_from_crypt_cpus performance compatibility option]' \ '(- : *)--version[show version information]' \ + '(- : *)'{-\?,--help}'[display help information]' \ + '(- : *)--usage[display brief usage]' \ ':action:->actions' \ '*::arguments:->action-arguments' && ret=0 case $state in actions) actions=( - 'create:create a mapping' - 'remove:remove an existing mapping' + 'open:open device with named mapping' + 'close:close device (remove mapping)' 'status:report mapping status' 'resize:resize an active mapping' + 'benchmark:benchmark cipher' + 'repair:try to repair on-disk metadata' + 'erase:erase all keyslots' 'luksFormat:initialize a LUKS partition' - 'luksOpen:open LUKS partition' - 'luksClose:remove an existing mapping' - 'luksSuspend:suspend active device' - 'luksResume:resume suspended device' 'luksAddKey:add a new key' 'luksRemoveKey:remove a key' 'luksChangeKey:change a key' @@ -51,6 +67,9 @@ case $state in 'luksUUID:print/change device UUID' 'isLuks:check if device is a LUKS partition' 'luksDump:dump header information' + 'tcryptDump:dump TCRYPT device information' + 'luksSuspend:suspend LUKS device and wipe key' + 'luksResume:resume suspended LUKS device' 'luksHeaderBackup:store binary backup of headers' 'luksHeaderRestore:restore header backup' ) @@ -61,18 +80,21 @@ case $state in local mapping=':mapping:_path_files -W /dev/mapper' local device=':device:_files' case ${words[1]} in - create) args=( $mapping $device );; + create) args=( $mapping $device '--type=:type' );; + open) args=( $device $mapping '--type=:type' );; + (plain|luks|loopaes|tcrypt)Open) args=( $device $mapping '--type=:type' );; + benchmark) args=( '--cipher=:cipher' );; luksKillSlot) args=( $device ':key slot number' );; - luksOpen) args=( $device $mapping );; - remove|status|resize|luksClose|luksSuspend|luksResume) args=( $mapping );; - luks(AddKey|RemoveKey|DelKey|UUID|Dump)|isLuks) args=( $device );; + remove|status|resize|*lose|luksSuspend|luksResume) args=( $mapping );; + erase|repair|(luks(AddKey|Erase|RemoveKey|DelKey|UUID|Dump)|isLuks)) + args=( $device ) + ;; luks(Format|AddKey|RemoveKey|ChangeKey)) args=( $device ':key file:_files' ) ;; luksHeader*) args=( $device '--header-backup-file:file:_files' );; *) - _default - return + _default && ret=0 ;; esac _arguments $args && ret=0 .