summaryrefslogtreecommitdiffstats
path: root/completions/bash-nvme-completion.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-07-26 05:11:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-07-26 05:18:07 +0000
commit2e650c1f5f2f79e7db10dec5dcdd1cffcaf47891 (patch)
tree82f2949088d2502e947b83ba9973de54f9bf4402 /completions/bash-nvme-completion.sh
parentReleasing debian version 2.0-1. (diff)
downloadnvme-cli-2e650c1f5f2f79e7db10dec5dcdd1cffcaf47891.tar.xz
nvme-cli-2e650c1f5f2f79e7db10dec5dcdd1cffcaf47891.zip
Merging upstream version 2.1~rc0 (Closes: #1015722).
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'completions/bash-nvme-completion.sh')
-rw-r--r--completions/bash-nvme-completion.sh15
1 files changed, 9 insertions, 6 deletions
diff --git a/completions/bash-nvme-completion.sh b/completions/bash-nvme-completion.sh
index 5e0eb23..e817701 100644
--- a/completions/bash-nvme-completion.sh
+++ b/completions/bash-nvme-completion.sh
@@ -1,14 +1,16 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
# bash tab completion for the nvme command line utility
# (unfortunately, bash won't let me add descriptions to cmds)
# Kelly Kaoudis kelly.n.kaoudis at intel.com, Aug. 2015
# Constant to indicate command has no options
-readonly NO_OPTS=""
+NO_OPTS=""
+readonly NO_OPTS
# Associative array of plugins and associated subcommands
# Order here is same as PLUGIN_OBJS in Makefile
-typeset -A _plugin_subcmds
-readonly _plugin_subcmds=(
+typeset -Ar _plugin_subcmds=(
[intel]="id-ctrl internal-log lat-stats \
set-bucket-thresholds lat-stats-tracking \
market-name smart-log-add temp-stats"
@@ -53,10 +55,10 @@ readonly _plugin_subcmds=(
[nvidia]="id-ctrl"
[ymtc]="smart-log-add"
)
+readonly _plugin_subcmds
# Associative array mapping plugins to coresponding option completions
-typeset -A _plugin_funcs
-readonly _plugin_funcs=(
+typeset -Ar _plugin_funcs=(
[intel]="plugin_intel_opts"
[amzn]="plugin_amzn_opts"
[memblaze]="plugin_memblaze_opts"
@@ -74,6 +76,7 @@ readonly _plugin_funcs=(
[nvidia]="plugin_nvidia_opts"
[ymtc]="plugin_ymtc_opts"
)
+readonly _plugin_funcs
# Top level commands
_cmds="list list-subsys id-ctrl id-ns \
@@ -939,7 +942,7 @@ plugin_micron_opts () {
return 0
}
-lugin_seagate_opts () {
+plugin_seagate_opts () {
local opts=""
local compargs=""