From: Matthijs Kooijman Date: Tue, 04 Mar 2014 14:57:03 GMT Subject: Re: [PATCH] git submodule foreach: Skip eval for more than one argument Message-ID: <20140304145703.GE11566@login.drsnuggles.stderr.nl> In-Reply-To: On Tue, Mar 04, 2014 at 03:53:24PM +0100, Johan Herland wrote: > On Tue, Mar 4, 2014 at 2:51 PM, Matthijs Kooijman wrote: > > matthijs@grubby:~/test$ git submodule foreach echo '$name' > > Entering 'test' > > $name > > jherland@beta ~/test$ echo '$name' > $name > > What would you expect echo '$name' to do? If I run git submodule foreach each '$name', then my shell eats the single quotes (which are only to prevent my shell from interpreting $name). git submodule will see $name, so it will run echo $name, not echo '$name'. > What happens if you use double instead of single quotes? Then my shell eats up the double quotes _and_ replaces $name with nothing, so I can't expect git submodule to replace it with the submodule name then :-) Does that help to clarify what I mean? Gr. Matthijs