From: Ævar Arnfjörð Bjarmason Date: Sun, 10 Apr 2011 22:43:52 GMT Subject: Re: [PATCH 1/2] git-sh-i18n--envsubst: our own envsubst(1) for eval_gettext() Message-ID: In-Reply-To: <7voc4ncg0l.fsf@alter.siamese.dyndns.org> On Sun, Apr 3, 2011 at 21:05, Junio C Hamano wrote: > Perhaps it is not an issue in real life; after all eval_gettext interface > is not something you invented in 5 minutes without thinking deeply, but is > what you plan to use from outside codebase that presumably has seen a wide > use in the field, and it may be just that I am worried too much about an > implausible corner case, but I thought I should bring it up. It's a corner case, but if we run into it we can easily solve it like this: #!/bin/sh . gettext.sh HOME=/home/junio path='$HOME/.gitconfig' var=core.i18n ( export HOME var ;# no need for HOME, but just an illustration # TRANSLATORS: $path will be "$HOME/.gitconfig" eval_gettext 'Look at $path and find definition of $var variable.'; echo ) Which results in: $ sh /tmp/foo.sh Look at $HOME/.gitconfig and find definition of core.i18n variable.