All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Waitz <tali@admingilde.org>
To: Matthias Lederhofer <matled@gmx.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Support environment variables in config file
Date: Mon, 4 Jun 2007 09:27:07 +0200	[thread overview]
Message-ID: <20070604072707.GE16637@admingilde.org> (raw)
In-Reply-To: <20070604053443.GA15148@moooo.ath.cx>

[-- Attachment #1: Type: text/plain, Size: 1389 bytes --]

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@admingilde.org> 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 #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2007-06-04  7:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-03 22:37 [PATCH] Support environment variables in config file Martin Waitz
2007-06-04  5:34 ` Matthias Lederhofer
2007-06-04  7:27   ` Martin Waitz [this message]
2007-06-04  8:44     ` Matthias Lederhofer
2007-06-04 15:57     ` Johannes Schindelin
2007-06-04 17:47       ` Martin Waitz
2007-06-04 17:59         ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070604072707.GE16637@admingilde.org \
    --to=tali@admingilde.org \
    --cc=git@vger.kernel.org \
    --cc=matled@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.