Non existent macros are not replaced
Andreas Ericsson
ae at op5.se
Mon Mar 7 14:41:03 CET 2011
On 03/07/2011 01:57 PM, Matthieu Kermagoret wrote:
> On Thu, Mar 3, 2011 at 8:08 PM, Jochen Bern<Jochen.Bern at linworks.de> wrote:
>> On 03/03/2011 07:33 PM, Andreas Ericsson wrote:
>>> Yes, but how about a command_line such as this:
>>> $USER1$/check_something '$pas$word'
>>> $pas$ is not a valid macro, so by the reasoning of the original poster
>>> we should remove it, but that would mean there can *never* be two
>>> dollar-signs that aren't part of macros inside anything where macros
>>> get interpreted
>>
>> I'm not saying that you should follow his reasoning, but why you keep
>> ignoring the official escaping method?
>>
>> "Also, if you want to pass a dollar sign ($) on the command line, you
>> have to escape it with another dollar sign."
>> -- http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html#command
>>
>
> As Jochen pointed out, the patch I propose still allows dollars to be
> given to the shell as there is an escaping method especially for this
> purpose.
>
>> The above quote from the docs says it isn't ("you HAVE to"). But as I
>> said, *enforcing* that out of the blue sky is problematic, to say the least.
>>
>
> While I agree that some configurations might be broken by this patch,
> the users that implemented them didn't follow the documentation in the
> first place and should therefore not be taken into account. With this
> patch legitimate users that would expect non-existent macros to simply
> be removed would be satisfied.
>
The same argument can be used against you for trying to use a macro
where it can't be used.
> So Andreas, would your reconsider your opinion about the application
> of this patch ?
>
No.
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
More information about the Developers
mailing list