From 9a4638f9f619920a8bc1c58248a9ee12523eba38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Mon, 1 Apr 2024 10:31:34 +0000 Subject: [PATCH] completion: make gsettings work in nounset mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ä --- gio/completion/gsettings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gio/completion/gsettings b/gio/completion/gsettings index d509758e9..ef1757636 100644 --- a/gio/completion/gsettings +++ b/gio/completion/gsettings @@ -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