Re: [PATCH] Support environment variables in config file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux