From: Evgeny Grin Date: Fri, 17 Jun 2022 12:00:39 +0000 (+0300) Subject: bash-nvme-completion.sh: fixed error when sourced twice X-Git-Tag: v2.1-rc0~27^2~1 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=eac9f9b70081ff2df2e2ea11efb8fc6ec3754f64;p=users%2Fsagi%2Fnvme-cli.git bash-nvme-completion.sh: fixed error when sourced twice One-line "readonly" with assignment produce error if completion file is sourced for the second time (/etc/profile reload, su etc.) --- diff --git a/completions/bash-nvme-completion.sh b/completions/bash-nvme-completion.sh index e5d9ff19..7b8a2121 100644 --- a/completions/bash-nvme-completion.sh +++ b/completions/bash-nvme-completion.sh @@ -5,7 +5,8 @@ # 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