problem: repos=$(cd $HOME/.am && echo *) ^-- SC2086: Double quote to prevent globbing and word splitting. ^-- SC2035: Use ./*glob* or --*glob* so names with dashes won't become options.
Signed-off-by: Bai Jing baijing14@huawei.com --- bin/mutt-git-am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/mutt-git-am b/bin/mutt-git-am index c2e8ebf..7a16105 100755 --- a/bin/mutt-git-am +++ b/bin/mutt-git-am @@ -8,7 +8,7 @@ patch=/tmp/$$.patch
cat > $patch
-repos=$(cd $HOME/.am && echo *) +repos=$(cd "$HOME"/.am && ls) repo=$(grep -m1 -o "Subject: .*] " $patch | grep -Eo "(${repos// /|})")
cd "$HOME/.am/$repo" || exit