summaryrefslogtreecommitdiffstats
path: root/completions
diff options
context:
space:
mode:
Diffstat (limited to 'completions')
-rw-r--r--completions/_nvme2
-rw-r--r--completions/bash-nvme-completion.sh15
2 files changed, 11 insertions, 6 deletions
diff --git a/completions/_nvme b/completions/_nvme
index f84ad6c..fc6b967 100644
--- a/completions/_nvme
+++ b/completions/_nvme
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
#compdef _nvme nvme
# zsh completions for the nvme command-line interface,
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=""