completion: make gsettings work in nounset mode

With the shell in nounset mode, an error is emitted on referencing
`schemadir` as it is not initialized in all code paths.

Initialize to an empty string to fix.

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
This commit is contained in:
Ville Skyttä 2024-04-01 10:31:34 +00:00
parent 573b4e35d1
commit bf1508fa76

View File

@ -5,7 +5,7 @@
####################################################################################################
__gsettings() {
local choices coffset schemadir
local choices coffset schemadir=""
if [ ${COMP_CWORD} -gt 2 ]; then
if [ ${COMP_WORDS[1]} = --schemadir ]; then