Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Denis PILAT <denis.pilat@st.com>
To: Eli Zaretskii <eliz@gnu.org>,
	denis.pilat@st.com, 	gdb-patches@sourceware.org
Subject: Re: [RFC] usage of environment variable from the command line
Date: Mon, 24 Sep 2007 15:05:00 -0000	[thread overview]
Message-ID: <46F7D210.3060704@st.com> (raw)
In-Reply-To: <20070922135839.GA6285@caradoc.them.org>

Sorry for the "ugly" syntax, my point was more about the possibility to 
use env. variable than the syntax itself which, I admit, is ugly.

My needs are only about text replacement, so $ENV(HOME) syntax is fine.
Do you like a  new patch ? Or shall we discuss more about it ?

-- 
Denis

Daniel Jacobowitz wrote:
> On Sat, Sep 22, 2007 at 09:16:38AM +0200, Eli Zaretskii wrote:
>   
>>> Before we go ahead with this can anyone think of a better one that
>>> won't conflict with source language expressions?
>>>       
>> How about env("FOO") ?  Or maybe $env("FOO"), to avoid a possibility
>> that the debuggee has a real function by the name of `env'?
>>     
>
> I like $env("FOO") or $ENV("FOO").
>
>   
>>> Another problem is escaping.  Right now, you're supposed to be able to
>>> give either quoted strings or raw text to most commands (it
>>> varies, I posted a summary a while back).  Front ends won't know how
>>> to escape the string if you have e.g. %% in your $PWD or want to
>>> print a string containing %%.
>>>       
>> The above suggestion solves this problem as well, I think.
>>     
>
> Mostly yes.  The context where environment variables would be most
> useful is in places we don't take expressions, like after the
> "file" command; we've been changing those to take quoted strings
> to handle spaces and backslashes safely, so we could allow
> backslash to escape dollar sign too.
>
> Do we want environment variable support only for things that take text
> (pathnames, filenames, string values), or do we also want it in C
> expression contexts?  If only the former, maybe $ENV(HOME) without
> the inner quotes; quotes are already special.
>
>   


  reply	other threads:[~2007-09-24 15:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-19 15:24 Denis PILAT
2007-09-21 22:55 ` Daniel Jacobowitz
2007-09-22  7:16   ` Eli Zaretskii
2007-09-22 13:58     ` Daniel Jacobowitz
2007-09-24 15:05       ` Denis PILAT [this message]
2007-09-24 16:44       ` Jim Blandy
2007-09-24 21:41         ` Eli Zaretskii
2007-09-25 17:11           ` Jim Blandy
2007-09-25 21:38             ` Eli Zaretskii
2007-09-30  1:30         ` Daniel Jacobowitz
2007-09-30  7:17           ` Eli Zaretskii
2007-10-11 17:51             ` Daniel Jacobowitz
2007-12-21 15:31             ` Denis PILAT
2007-12-22 19:27               ` Eli Zaretskii

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=46F7D210.3060704@st.com \
    --to=denis.pilat@st.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox