[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fwd: loginfo expansions and quotes -- documentation issues
From: |
Norman Gray |
Subject: |
Fwd: loginfo expansions and quotes -- documentation issues |
Date: |
Wed, 1 Dec 2004 22:29:24 +0000 |
Greetings,
[I think this is a sort of documentation bug, in that the 1.12
documentation appears not to specify the CVS behaviour completely. I
already asked this question on the info-cvs list, but I suspect that
may have been the wrong place.]
I have a puzzle about the new-style format strings in 1.12
administration files. Do they respect quotes? How do I ensure that
they expand into a single string?
The new syntax, as described in
<https://www.cvshome.org/docs/manual/cvs-1.12.6/cvs_18.html> for
example, notes that both flat and list format strings `will generate a
single argument to the called script', but the documentation doesn't
seem to make it clear how, if at all, this interacts with quotation
marks.
Specifically, I can't work out from the documentation whether
mail -s "Commit: %p" mail-addr
will generate a single argument to the -s option, or end up with
'"Commit:' being given to the -s option, and the result mailed to the
expansion of %p" The documentation doesn't allow me to conclude that
there's a full sh-style quote parser sitting behind here, so I'd
additionally guess that something like
mail -s `echo Commit: %p` mail-addr
would not work.
Now, a little experimentation (but only a little, because this is a
production server I'm working with) shows that "Commit: %p" does in
fact do the `correct' thing from my point of view. *But* this is
irrelevant -- since the documentation doesn't guarantee this, the
developers would be entitled to change it without warning next week,
and they may even regard this behaviour as a bug and be working
desperately to fix this.
My _guess_ is that the parser is intended to respect single and double
quotes (though there's no difference between them), in such a way that
the possibly multiple expansions of %p or %{sVv} are turned back into a
single argument if they are enclosed within quotes. Is that correct?
The examples show that subshells and redirections are supported as
well. Clearly some environment variables are available, such as
$CVSROOT -- is there a list of which ones?
Thanks for any advice,
Norman
--
----------------------------------------------------------------------
Norman Gray : Physics & Astronomy, Glasgow University, UK
http://www.astro.gla.ac.uk/users/norman/ : www.starlink.ac.uk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Fwd: loginfo expansions and quotes -- documentation issues,
Norman Gray <=