Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] _arguments: Escape colons and backslashes in $opt_args unambiguously.

On Sep 7, 10:07pm, Daniel Shahaf wrote:
} Subject: Re: [PATCH] _arguments: Escape colons and backslashes in $opt_arg
} Bart Schaefer wrote on Wed, Sep 07, 2016 at 00:03:20 -0700:
} > On Sep 4,  6:26pm, Daniel Shahaf wrote:
} > }
} > } Is it okay to refer to NEWS from the manual?
} > 
} > Are there any other examples of the manual referring directly to the
} > behavior of previous versions?
} Yes: CONTINUE_ON_ERROR in zshoptions(1).  (And the usage examples under
} is-at-least, but that doesn't count.)
} > It's not the kind of thing it's easy to search for,
} I found that with:
} .
}     ag -C 3 -G 'yo$' '[345][.][0-9]' Doc/Zsh
} .

I suspect "ag" is the same thing I have installed as "ack".

  ack -C 1 -G .yo$ version Doc | grep -i /Zsh/.\*zsh

which should have found all mentions of "version" and "zsh" on the same
or adjacent lines.  Found the 5.0.1 reference, and a remark about "the
restriction in older versions of zsh" in params.yo discussion of export.

} I'm happy to drop the note entirely, or to drop the reference to NEWS
} and keep the sentence stating the behaviour difference.

CONINUE_ON_ERROR was a *lot* more significant change than this -- I'd
classify backslashing the backslashes as a bug fix, and we don't usually
call those out in the manual.

Anyway this has probably now had more thought than it was worth.

} > } +ambiguity: if the -x option took two arguments (as in
} > } +    _arguments : -x:foo:${action}:bar:$action
} > } +), it would be impossible to tell from $opt_args whether the command-line
} > } +was '-x foo\:bar' or '-x foo\\ bar'.
} > 
} > Is this example correct?  Isn't the actual ambiguity between
} > [[[ -x foo\:bar ]]] (one arg) and [[[ -x foo bar ]]] (two args)?
} > If I'm wrong, what is it about your explanation that confused me?
} I don't know.

Sometime after I'd sent that message, it occurred to me that the phrase
"two words where the first ends in a backslash cannot be distinguished
from one word with a backslashed colon in the middle" was what you were
getting at all along, and that indeed the example was correct.  Maybe
just write that out?

Messages sorted by: Reverse Date, Date, Thread, Author