]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
completions: add changed-alloc-ns-list-log command
authorTokunori Ikegami <ikegami.t@gmail.com>
Fri, 7 Feb 2025 15:10:15 +0000 (00:10 +0900)
committerDaniel Wagner <wagi@monom.org>
Mon, 10 Feb 2025 12:46:38 +0000 (13:46 +0100)
Both bash and zsh completions updated for the command.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
completions/_nvme
completions/bash-nvme-completion.sh

index 0e44629e29bc281c215779277fcb875c34698514..4e682e9e0cfb8391522e13179023ac072847f5d4 100644 (file)
@@ -111,6 +111,7 @@ _nvme () {
        'io-mgmt-recv:send an I/O management receive command'
        'io-mgmt-send:send an I/O management send command'
        'mgmt-addr-list-log:retrieve management address list log'
+       'changed-ns-list-log:retrieve changed allocated namespaces log'
        'version:show the program version'
        'ocp:OCP cloud SSD extensions'
        'solidigm:Solidigm plug-in extensions'
@@ -2639,11 +2640,22 @@ _nvme () {
                        -v':alias for --verbose'
                        --output-format=':Output format: normal|json|binary'
                        -o ':alias for --output-format'
+                       _describe -t commands "nvme rotational-media-info-log" _rmi_log
+               (changed-alloc-ns-list-log)
+                       local _changed_alloc_ns_list_log
+                       _changed_alloc_ns_list_log=(
+                       /dev/nvme':supply a device to use (required)'
+                       --output-format=':Output format: normal|json|binary'
+                       -o':alias for --output-format'
+                       --raw-binary':dump infos in binary format'
+                       -b':alias of --raw-binary'
+                       --verbose':Increase the information detail in the output.'
+                       -v':alias for --verbose'
                        --timeout=':value for timeout'
                        -t ':alias for --timeout'
                        )
                        _arguments '*:: :->subcmds'
-                       _describe -t commands "nvme rotational-media-info-log" _rmi_log
+                       _describe -t commands "nvme changed-alloc-ns-list-log options" _changed_alloc_ns_list_log
                        ;;
                (version)
                        local _version
@@ -2757,7 +2769,7 @@ _nvme () {
                        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 dapustor mgmt-addr-list-log
-                       rotational-media-info-log
+                       rotational-media-info-log changed-alloc-ns-list-log
                        )
                        _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
index de2efde45d7a28a86a18cda4efddc283556513a3..12b09ef53f9a80a0a08d6f104fb32699ff70d7eb 100644 (file)
@@ -486,6 +486,10 @@ nvme_list_opts () {
                opts+=" --endg-id= -e --verbose -v --output-format= -o \
                        --timeout= -t"
                        ;;
+               "changed-alloc-cns-list-log")
+               opts+=" --output-format= -o --raw-binary -b  --verbose -v \
+                       --timeout= -t"
+                       ;;
                "version")
                opts+=$NO_OPTS
                        ;;
@@ -1677,7 +1681,7 @@ _nvme_subcmds () {
                supported-log-pages lockdown media-unit-stat-log \
                supported-cap-config-log dim show-topology list-endgrp \
                nvme-mi-recv nvme-mi-send get-reg set-reg mgmt-addr-list-log \
-               rotational-media-info-log"
+               rotational-media-info-log changed-alloc-ns-list-log"
 
        # Add plugins:
        for plugin in "${!_plugin_subcmds[@]}"; do