Skip to content

Commit 2d6bbb6

Browse files
xyzhang-upigaw
authored andcommitted
completions: add the zsh completion of the dapustor plugin
add the zsh completion of the dapustor plugin Signed-off-by: Xiaoyuan Zhang <zhxiaoy2024@gmail.com>
1 parent 103a273 commit 2d6bbb6

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

completions/_nvme

+32-1
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ _nvme () {
113113
'ocp:OCP cloud SSD extensions'
114114
'solidigm:Solidigm plug-in extensions'
115115
'micron:Micron plug-in extensions'
116+
'dapustor:DapuStor plug-in extensions'
116117
'help:print brief descriptions of all nvme commands'
117118
'json:dump output in json format'
118119
)
@@ -548,6 +549,26 @@ _nvme () {
548549
;;
549550
esac
550551
;;
552+
(dapustor)
553+
case ${words[2]} in
554+
(smart-log-add)
555+
local _smart_log_add
556+
_smart_log_add=(
557+
--namespace-id':(optional) desired namespace'
558+
-n':alias for --namespace-id'
559+
--output-format':Output format: normal|json|binary'
560+
-o':alias for --output-format'
561+
--raw-binary':dump log in binary format'
562+
-b':alias of --raw-binary'
563+
)
564+
_arguments '*:: :->subcmds'
565+
_describe -t commands "nvme dapustor smart-log-add options" _smart_log_add
566+
;;
567+
(*)
568+
_files
569+
;;
570+
esac
571+
;;
551572
(sanitize)
552573
case ${words[CURRENT-1]} in
553574
(--sanact=|-a)
@@ -2618,6 +2639,16 @@ _nvme () {
26182639
_arguments '*:: :->subcmds'
26192640
_describe -t commands "nvme micron options" _micron
26202641
;;
2642+
(dapustor)
2643+
local _dapustor
2644+
_dapustor=(
2645+
smart-log-add':Retrieve DapuStor SMART Log'
2646+
version':Shows the program version'
2647+
help':Display this help'
2648+
)
2649+
_arguments '*:: :->subcmds'
2650+
_describe -t commands "nvme dapustor options" _dapustor
2651+
;;
26212652
(help)
26222653
local _h
26232654
_h=( id-ctrl id-ns list-ns id-iocs create-ns delete-ns attach-ns detach-ns
@@ -2635,7 +2666,7 @@ _nvme () {
26352666
get-property write-zeroes write-uncor verify sanitize sanitize-log reset
26362667
subsystem-reset ns-rescan get-lba-status dsm discover connect-all connect
26372668
dim disconnect disconnect-all gen-hostnqn show-hostnqn tls-key dir-receive
2638-
dir-send virt-mgmt rpmb version ocp solidigm
2669+
dir-send virt-mgmt rpmb version ocp solidigm dapustor
26392670
)
26402671
_arguments '*:: :->subcmds'
26412672
_describe -t commands "help: infos on a specific nvme command, or provide no option to see a synopsis of all nvme commands" _h

0 commit comments

Comments
 (0)