[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [patch] utils: qs not escaping pipes
From: |
Peter Bex |
Subject: |
Re: [Chicken-hackers] [patch] utils: qs not escaping pipes |
Date: |
Tue, 26 Feb 2013 09:14:31 +0100 |
User-agent: |
Mutt/1.4.2.3i |
On Mon, Feb 25, 2013 at 02:53:10PM +0100, Michele La Monaca wrote:
> On Mon, Feb 25, 2013 at 9:10 AM, Peter Bex <address@hidden> wrote:
>
> > Do you have a reference where we can read up on this "caret escaping"?
>
> I think you already provided one:
> http://technet.microsoft.com/en-us/library/cc723564.aspx
I found its treatment about caret escaping confusing after your
statement that there's a difference between paths and non-paths.
The description from technet seems to indicate it has the same
functionality as \ in UNIX.
> > If it's context-dependent it seems like it would be impossible to decide
> > generally which to use,
>
> Right. In Windows escape/quoting rules really depends on which command
> is issued. The interpretation of the command-line is mostly up to the
> command itself. And each command has its own interpretation of the
> rules. An example?
>
> # cd a^ b
>
> will try to enter the "a b" folder, while
>
> # md a^ b
>
> will create the folders "a" and "b".
What about these two?
# cd "a b"
and
# md "a b"
> > and we might need an extra option to choose between both quoting forms
> > (abusing the "quoting" option for this is
> > wrong because the difference in Windows is semantical while in Unix it
> > seems to be purely aesthetical).
>
> Not quite true. For example backslash-escaping has this nice property:
>
> (qs (string-append s1 s2)) == (string-append (qs s1) (qs s2))
If this is desirable or neccessary, we should just stick with backslash
escaping, if we can make it work properly (that is, without a blacklist).
Having two separate styles of escaping is needlessly complex and
confusing. Good design involves trade-offs and making decisions, rather
than punting on every decision and forcing it upon the user. Especially
when it's unclear whether both styles are equally safe!
Cheers,
Peter
--
http://www.more-magic.net
- Re: [Chicken-hackers] [patch] utils: qs not escaping pipes, (continued)
Re: [Chicken-hackers] [patch] utils: qs not escaping pipes, Michele La Monaca, 2013/02/19
Re: [Chicken-hackers] [patch] utils: qs not escaping pipes, Michele La Monaca, 2013/02/24