curl-users
RE: ENV vars in config files?
Date: Fri, 3 Nov 2000 16:18:27 +0100 (MET)
On Thu, 2 Nov 2000 Nico.Baggus_at_mail.ing.nl wrote:
> A fairly usable variable substitution syntax would be:
>
> ${name} references a name being an internal one (the options)
> or an external one (ENV).
>
> Maybe it is a consideration to allow references to other options.., then
> you don't need a += like syntax but more something like:
>
> option1 = "World"
> option2 = "Hello, ${option1}!"
> ;)
Yes, that would work:
data = "tool=curl"
data = "${data}&ssl=yes"
... and for reading environment variables as well:
data = "home=${HOME}"
> Then please also consider an option name for the url on the commandline.
> curl -K config --arguments <info1> <info2>
> where the config file specified:
> -F "item1=${arg0}" -F "item2=${arg1}"
Well, wouldn't it be even better if the command line switch would allow the
format to be VAR=CONTENTS ? Like:
curl --argument name=daniel --argument curl=yes -K config
Hm, but that comes very close to being unnecessary since the variables could
just as well be set in environment variables in this case (and save me from
lots of work :-):
name=daniel curl=yes curl -K config (sh/bash syntax)
-- Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/Received on 2000-11-03