On Mon, Sep 19, 2022 at 09:20:13AM +0800, t.feng via Grub-devel wrote: > SC2070 (error): -n doesn't work with unquoted arguments. > Quote or use [[ ]]. > In grub-completion.bash.in line 130: > [ -n $tmp ] && { > ^--^ SC2070 (error) > > ref:https://github.com/koalaman/shellcheck/wiki/SC2070
Missing SOB. Otherwise LGTM... > --- > util/bash-completion.d/grub-completion.bash.in | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/util/bash-completion.d/grub-completion.bash.in > b/util/bash-completion.d/grub-completion.bash.in > index 44bf135b9..93d143480 100644 > --- a/util/bash-completion.d/grub-completion.bash.in > +++ b/util/bash-completion.d/grub-completion.bash.in > @@ -127,7 +127,7 @@ __grub_list_modules () { > local IFS=$'\n' > COMPREPLY=( $( compgen -f -X '!*/*.mod' -- "${grub_dir}/$cur" | { > while read -r tmp; do > - [ -n $tmp ] && { > + [ -n "$tmp" ] && { > tmp=${tmp##*/} > printf '%s\n' ${tmp%.mod} > } Daniel _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel