From 07bd426dc66789a5ec43973364dc8d59bf43b914 Mon Sep 17 00:00:00 2001 From: Steven Seungcheol Lee Date: Wed, 25 Aug 2021 18:14:20 +0900 Subject: [PATCH] completions: Add Completion for Identify(CNS 08h) Signed-off-by: Steven Seungcheol Lee --- completions/_nvme | 15 +++++++++++++++ completions/bash-nvme-completion.sh | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/completions/_nvme b/completions/_nvme index 9204536f..82a28b61 100644 --- a/completions/_nvme +++ b/completions/_nvme @@ -10,6 +10,7 @@ _nvme () { 'id-ctrl:display information about the controller' 'id-ns:display information about the namespace' 'list-ns:identify all namespace(s) attached' + 'cmdset-ind-id-ns':display I/O Command Set Independent information about the namespace' 'id-iocs:display information about I/O command sets' 'id-domain:display information about domain list' 'create-ns:create a new namespace before attachment' @@ -105,6 +106,20 @@ _nvme () { _arguments '*:: :->subcmds' _describe -t commands "nvme list-ns options" _listns ;; + (cmdset-ind-id-ns) + local _cmdset_ind_idns + _cmdset_ind_idns=( + /dev/nvme':supply a device to use (required)' + --namespace-id=':show infos for namespace ' + -n':alias of --namespace-id' + --raw-binary':dump infos in binary format' + -b':alias of --raw-binary' + --human-readable':show infos in readable format' + -H':alias of --human-readable' + ) + _arguments '*:: :->subcmds' + _describe -t commands "nvme cmdset-ind-id-ns options" _cmdset_ind_idns + ;; (id-iocs) local _idiocs _idiocs=( diff --git a/completions/bash-nvme-completion.sh b/completions/bash-nvme-completion.sh index 2b31233e..4d3097aa 100644 --- a/completions/bash-nvme-completion.sh +++ b/completions/bash-nvme-completion.sh @@ -154,6 +154,10 @@ nvme_list_opts () { opts+=" --namespace-id= -n --cntid= -c \ --output-format= -o" ;; + "cmdset-ind-id-ns") + opts+=" --namespace-id= -n --raw-binary -b \ + --human-readable -H --output-format= -o" + ;; "nvm-id-ctrl") opts+=" --output-format= -o" ;; -- 2.50.1