From cd84329b8d5294a771e45affcac90758e986b19b Mon Sep 17 00:00:00 2001 From: Tokunori Ikegami Date: Sun, 14 Apr 2024 02:09:45 +0900 Subject: [PATCH] completions: Add timeout option zsh completions Added the option as a nvme default option. Signed-off-by: Tokunori Ikegami --- completions/_nvme | 86 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 75 insertions(+), 11 deletions(-) diff --git a/completions/_nvme b/completions/_nvme index b3a41bc34f..8e03b7f39f 100644 --- a/completions/_nvme +++ b/completions/_nvme @@ -594,6 +594,8 @@ _nvme () { -a':alias of --all' --output-format=':Output format: normal|json|binary' -o':alias for --output-format' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme list-ns options" _listns @@ -1030,6 +1032,8 @@ _nvme () { -b':alias to --raw-binary' --csi=':command set identifier' -c':alias of --csi' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme effects-log options" _effects_log @@ -1107,6 +1111,8 @@ _nvme () { --cdw11=':dword 11 value, used for interrupt vector configuration only' --raw-binary':dump infos in binary format' -b':alias to --raw-binary' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme get-feature options" _getf @@ -1121,6 +1127,8 @@ _nvme () { -s':alias for --self-test-code' --wait':Wait for the test to finish' -w':alias to --wait' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme device-self-test options" _device_self_test @@ -1153,6 +1161,8 @@ _nvme () { -s':alias of --scp' --uuid=':UUID Index field required aligned with Scope' -U':alias of --uuid' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme lockdown options" _lockdown @@ -1173,6 +1183,8 @@ _nvme () { -V'alias to --value' --uuid-index=':uuid index' -U':alias for --uuid-index' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme set-feature options" _setf @@ -1185,6 +1197,8 @@ _nvme () { -O':alias to --offset' --value=':the value of the property to be set' -V':alias to --value' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme set-property options" _set_property @@ -1197,6 +1211,8 @@ _nvme () { -O':alias to --offset' --human-readable':show infos in readable format' -H':alias of --human-readable' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme get-property options" _get_property @@ -1231,6 +1247,8 @@ _nvme () { -a':alias of --action' --slot=':firmware slot to activate' -s':alias of --slot' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme fw-commit options" _fw_commit @@ -1245,13 +1263,15 @@ _nvme () { -x':alias of --xfer' --offset=':starting offset, in dwords (defaults to 0, only useful if download is split across multiple files)' -O':alias of --offset' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme fw-download options" _fwd ;; (capacity-mgmt) - local _fwd - _fwd=( + local _capacity_mgmt + _capacity_mgmt=( /dev/nvme':supply a device to use (required)' --operation=':Operation to be performed by the controller' -O':alias of --operation' @@ -1261,9 +1281,11 @@ _nvme () { -l':alias of --cap-lower' --cap-upper=':Most significant 32 bits of the capacity in bytes' -u':alias of --cap-upper' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' - _describe -t commands "nvme capacity-mgmt options" _fwd + _describe -t commands "nvme capacity-mgmt options" _capacity_mgmt ;; (write-zeroes) local _write_zeroes @@ -1297,6 +1319,8 @@ _nvme () { -C':alias of --storage-tag-check' --dir-spec=':directive specific' -D':alias of --dir-spec' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme write-zeroes options" _write_zeroes @@ -1315,6 +1339,8 @@ _nvme () { -T':alias of --dir-type' --dir-spec':directive specific' -S':alias of --dir-spec' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme write-uncor options" _write_uncor @@ -1345,6 +1371,8 @@ _nvme () { -S':alias of --storage-tag' --storage-tag-check':Storage Tag field shall be checked as part of end-to-end data protection processing' -C':alias of --storage-tag-check' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme verify options" _verify @@ -1554,7 +1582,9 @@ _nvme () { --spsp=':send security-protocol-specific data as defined in SPC-4' -s':alias for --spsp' --tl=':transfer length as defined in SPC-4' - -t':alias for --tl' + -l':alias for --tl' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme security-send options" _ssend @@ -1570,9 +1600,11 @@ _nvme () { --size=':size of buffer (prints to stdout on successful recv)' -x':alias for --size' --al=':allocation length as defined in SPC-4' - -a':alias for --al' + -l':alias for --al' --raw-binary':dump output in binary format' -b':alias for --raw-binary' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme security-recv options" _srecv @@ -1608,13 +1640,15 @@ _nvme () { --prkey=':pre-empt reservation key' -p':alias for --prkey' --rtype=':hexadecimal reservation type' - -t':alias for --rtype' + -T':alias for --rtype' --racqa=':reservation acquire action' -a':alias for --racqa' --iekey=':ignore existing reservation key' -i':alias for --iekey' --crkey':current reservation key' -c':alias for --crkey' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme resv-acquire options" _acq @@ -1626,11 +1660,13 @@ _nvme () { --namespace-id=':nsid' -n':alias of --namespace-id' --rtype=':hexadecimal reservation type' - -t':alias of --rtype' + -T':alias of --rtype' --rrela=':reservation release action' -a':alias of --rrela' --iekey':ignore existing reservation key' -i':alias of --iekey' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme resv-release options" _rel @@ -1647,6 +1683,8 @@ _nvme () { -e':alias of --eds' --raw-binary':dump output in binary format' -b':alias of --raw-binary' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme resv-report options" _rep @@ -1667,6 +1705,8 @@ _nvme () { -r':alias for --rrega' --iekey':ignore existing reservation key' -i':alias for --iekey' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme resv-register options" _reg @@ -1691,6 +1731,8 @@ _nvme () { -r':alias of --idr' --cdw11=':value for command dword 11' -c':alias for --cdw11' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme dsm options" _dsm @@ -1731,10 +1773,12 @@ _nvme () { -S':alias of --dir-spec' --format=':source range entry format' -F':alias of --format' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' - _describe -t commands "nvme copy options" _copy - ;; + _describe -t commands "nvme copy options" _copy + ;; (flush) local _flush _flush=( @@ -1773,6 +1817,10 @@ _nvme () { -V':alias of --show-command' --dry-run':show command instead of sending to device' -w':alias of --show-command' + --latency':latency statistics will be output following compare' + -L':alias of --latency' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme compare options" _comp @@ -1802,13 +1850,15 @@ _nvme () { --limited-retry':if included, controller should try less hard to retrieve data from media (if not included, all available data-recovery means used)' -l':alias of --limited-retry' --latency':latency statistics will be output following read' - -t':alias of --latency' + -L':alias of --latency' --force-unit-access':data read shall be returned from nonvolatile media before command completion is indicated' -f':alias of --force-unit-access' --show-command':show command instead of sending to device' -V':alias of --show-command' --dry-run':show command instead of sending to device' -w':alias of --show-command' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme read options" _read @@ -1838,13 +1888,15 @@ _nvme () { --limited-retry':if included, controller should try less hard to send data to media (if not included, all available data-recovery means used)' -l':alias of --limited-retry' --latency':latency statistics will be output following write' - -t':alias of --latency' + -L':alias of --latency' --force-unit-access':data shall be written to nonvolatile media before command completion is indicated' -f':alias of --force-unit-access' --show-command':show command instead of sending to device' -V':alias of --show-command' --dry-run':show command instead of sending to device' -w':alias of --show-command' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme write options" _wr @@ -1853,6 +1905,8 @@ _nvme () { local _shor _shor=( /dev/nvme':supply a device to use (required)' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme show-regs options" _shor @@ -2144,6 +2198,8 @@ _nvme () { -r':alias of --req-resource' --human-readable':show infos in readable format' -H':alias of --human-readable' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme dir-receive options" _dir_receive @@ -2172,6 +2228,8 @@ _nvme () { -b':alias for --raw-binary' --input-file=':write/send file (default stdin)' -i':alias of --input-file' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme dir-send options" _dir_send @@ -2188,6 +2246,8 @@ _nvme () { -a':alias of --act' --nr=':Number of Controller Resources(NR)' -n':alias of --nr' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme virt-mgmt options" _virt_mgmt @@ -2313,6 +2373,8 @@ _nvme () { -o ':alias for --output-format' --verbose':Increase the information detail in the output.' -v':alias for --verbose' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme get-reg options" _get_reg @@ -2346,6 +2408,8 @@ _nvme () { -o ':alias for --output-format' --verbose':Increase the information detail in the output.' -v':alias for --verbose' + --timeout=':value for timeout' + -t':alias of --timeout' ) _arguments '*:: :->subcmds' _describe -t commands "nvme set-reg options" _set_reg