1
0
Fork 0
mirror of https://github.com/spf13/cobra synced 2025-04-01 04:19:15 +00:00

fix(bash): nounset unbound file filter variable on empty extension ()

Happens at least if a flag is marked as filename, with "" given as
extensions.
This commit is contained in:
Ville Skyttä 2025-02-01 23:35:34 -01:00 committed by GitHub
parent 41b26ec8bb
commit 4ba5566f57
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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.