[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [patch] utils: qs not escaping pipes
From: |
Felix |
Subject: |
Re: [Chicken-hackers] [patch] utils: qs not escaping pipes |
Date: |
Mon, 18 Feb 2013 19:00:00 +0100 (CET) |
>>
>> I found qs very helpful.
>
> Me too. But if we can't get it to work correctly, it's a danger.
I think that is a bit of an exaggeration.
>> csc does this double-wrapping, as does setup-api (see "$system" - for
>> some unknown reason the god of consistency has made sure these
>> functions do actually roughly the same thing). I darkly recall that
>> '...' was not sufficient for quoting everything but apparently that
>> was wrong. Weird.
>
> I'm not sure if this is an answer to my question. Or maybe I don't
> understand the answer :)
I probably didn't understand the question.
>
>> One question, though: how can I escape the tick (#\') itself? My
>> attempts at the bash prompt using various combinations of ' and \
>> don't seem to work. Actually, the more I try, the more I realize that
>> the situation with bash isn't much better than it with with Windows
>> ...
>
> First off, it's POSIX (bourne) shell we're targeting, not specifically
> bash (which has stupid additional idiosyncracies).
Thank you for clearing that up.
>
> What the patch does is to quote a string like "it's a dark, rainy night"
> as 'it'\''s a dark, rainy night'
Very good.
>
> In other words, it leaves the quoted string and escapes the quote
> outside. Then it re-enters the string. It needs to be done like
> this because the backslash loses its special meaning inside single
> quotes (which is why it doesn't need to be special-cased in this
> new version).
Thanks a lot.
cheers,
felix
Re: [Chicken-hackers] [patch] utils: qs not escaping pipes, Michele La Monaca, 2013/02/19