From: Junio C Hamano Date: Mon, 16 Apr 2018 22:42:07 GMT Subject: Re: [PATCH v2 3/6] generate-cmdlist.sh: keep all information in common-cmds.h Message-ID: In-Reply-To: SZEDER Gábor writes: >> +while read cmd category tags >> do >> - tag=$(echo "$tags" | sed "$substnum; s/[^0-9]//g") >> + name=${cmd/git-} > > There are two issues with this line: > > - This is a "regular" shell script, therefore it must not use pattern > substitution. Oops. I missed that. Thanks. > > - The pattern substitution would remove the string "git-" in the middle of > the variable as well; I suspect this is undesired. > > I think that the remove matching prefix pattern substitution should be > used here.