From 2d6bbb67c77d3827fca8b26f548634aeb990a352 Mon Sep 17 00:00:00 2001 From: Xiaoyuan Zhang Date: Thu, 8 Aug 2024 19:31:06 +0800 Subject: [PATCH] completions: add the zsh completion of the dapustor plugin add the zsh completion of the dapustor plugin Signed-off-by: Xiaoyuan Zhang --- completions/_nvme | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/completions/_nvme b/completions/_nvme index 47fdd9d3..6e80dd31 100644 --- a/completions/_nvme +++ b/completions/_nvme @@ -113,6 +113,7 @@ _nvme () { 'ocp:OCP cloud SSD extensions' 'solidigm:Solidigm plug-in extensions' 'micron:Micron plug-in extensions' + 'dapustor:DapuStor plug-in extensions' 'help:print brief descriptions of all nvme commands' 'json:dump output in json format' ) @@ -548,6 +549,26 @@ _nvme () { ;; esac ;; + (dapustor) + case ${words[2]} in + (smart-log-add) + local _smart_log_add + _smart_log_add=( + --namespace-id':(optional) desired namespace' + -n':alias for --namespace-id' + --output-format':Output format: normal|json|binary' + -o':alias for --output-format' + --raw-binary':dump log in binary format' + -b':alias of --raw-binary' + ) + _arguments '*:: :->subcmds' + _describe -t commands "nvme dapustor smart-log-add options" _smart_log_add + ;; + (*) + _files + ;; + esac + ;; (sanitize) case ${words[CURRENT-1]} in (--sanact=|-a) @@ -2618,6 +2639,16 @@ _nvme () { _arguments '*:: :->subcmds' _describe -t commands "nvme micron options" _micron ;; + (dapustor) + local _dapustor + _dapustor=( + smart-log-add':Retrieve DapuStor SMART Log' + version':Shows the program version' + help':Display this help' + ) + _arguments '*:: :->subcmds' + _describe -t commands "nvme dapustor options" _dapustor + ;; (help) local _h _h=( id-ctrl id-ns list-ns id-iocs create-ns delete-ns attach-ns detach-ns @@ -2635,7 +2666,7 @@ _nvme () { get-property write-zeroes write-uncor verify sanitize sanitize-log reset subsystem-reset ns-rescan get-lba-status dsm discover connect-all connect dim disconnect disconnect-all gen-hostnqn show-hostnqn tls-key dir-receive - dir-send virt-mgmt rpmb version ocp solidigm + dir-send virt-mgmt rpmb version ocp solidigm dapustor ) _arguments '*:: :->subcmds' _describe -t commands "help: infos on a specific nvme command, or provide no option to see a synopsis of all nvme commands" _h -- 2.50.1