hoi :) thanks for the review! Do you think the approach is ok? Can you see other examples where we may need $VAR support? Or would everybody be happy with support for ~/ in filenames? On Mon, Jun 04, 2007 at 07:34:43AM +0200, Matthias Lederhofer wrote: > Martin Waitz <tali@xxxxxxxxxxxxxx> wrote: > > Environment variables (e.g. $HOME) can be helpful for the GIT configuration. > > With this change you can use them with the normal shell "$" syntax. > > If you want to insert a plain "$" in a variable, it can be escaped as \$ > > or put inside quotes ("). > > Perhaps we should also allow variable interpolation in double quoted > strings as this is quite common in various languages. I thought about that too. I guess I first will have to do a patch which adds single quote (') support. > We could have a short example here how to concatenate a variable and a > string without a space in between. I came up with '$FOO""bar' which > is not that obvious imo. yes, shell-like ${FOO} would be nicer but I don't know if it is that important. Perhaps your example $FOO"bar". > You should allow at least underscores in environment variables too. right > If you use the HOME environment variable without setting it yourself > you should place quotes around the $(..) in case there is a space in > $HOME: stupid error, yes. -- Martin Waitz
Attachment:
signature.asc
Description: Digital signature