git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Potential asterisk expansion bug in Windows Git Bash?

From
BZBo Zhang <zhangbodut@gmail.com>
Date
Aug 14, 2019, 11:50 UTC
Message-ID
<CAO=KXnspgZa=R9=8wvPY-Y8pvuAah-D+Jc4CM_+cdemYGUJ09A@mail.gmail.com>
Hi there,

Not sure if this is the correct channel to submit a bug report for Windows Git Bash. Please let me know if I did anything wrong.

Today I noticed that on Windows Git Bash, the asterisk (*) is incorrectly expanded even when it’s in a quote or following a backslash (\). I’m wondering if this is the correct behaviour (which seems like to me NOT).

Step to reproduce (in Windows git bash):

zhb@zhb-PC MINGW64 ~/Desktop $ bash --version GNU bash, version 4.4.19(2)-release (x86_64-pc-msys) Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

zhb@zhb-PC MINGW64 ~/Desktop $ cat 1.sh echo $1

zhb@zhb-PC MINGW64 ~/Desktop $ bash 1.sh '*' $A 1.sh 1.txt

zhb@zhb-PC MINGW64 ~/Desktop $ bash 1.sh "*" $A 1.sh 1.txt

zhb@zhb-PC MINGW64 ~/Desktop $ bash 1.sh \* 1.sh 1.txt

Thank you very much.

Regards, Bo Zhang

Next: Jeff King
Message 1 of 3 in “Potential asterisk expansion bug in Windows Git Bash?”
  1. Bo ZhangAug 14, 2019
  2. Jeff KingAug 14, 2019
  3. Bo ZhangAug 14, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.