From 4ba5566f5704a9c0d205e1ef3efc4896156d33fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sat, 1 Feb 2025 23:35:34 -0100 Subject: [PATCH] fix(bash): nounset unbound file filter variable on empty extension (#2228) Happens at least if a flag is marked as filename, with "" given as extensions. --- bash_completionsV2.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bash_completionsV2.go b/bash_completionsV2.go index ee2a52d3..d2397aa3 100644 --- a/bash_completionsV2.go +++ b/bash_completionsV2.go @@ -146,7 +146,7 @@ __%[1]s_process_completion_results() { if (((directive & shellCompDirectiveFilterFileExt) != 0)); then # File extension filtering - local fullFilter filter filteringCmd + local fullFilter="" filter filteringCmd # Do not use quotes around the $completions variable or else newline # characters will be kept.