Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] _arguments: Escape colons and backslashes in $opt_args unambiguously.
- X-seq: zsh-workers 39233
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] _arguments: Escape colons and backslashes in $opt_args unambiguously.
- Date: Wed, 7 Sep 2016 17:13:56 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=21z2L6PZaVbPUWPX+58PduQpqvHOWvzyqU1RavZK2Is=; b=lebrw7pFuTC8iGp/LVFygorNFEUwb8DzxJw6vKbFgMNduOXzz9TIwxcGA1R1+6TBQC oIQ+SC6DZIBL+Uqg50TiSZEQ+OxqLBmIP5jltDuf5LQQWihkbzbP9nVgtOwOZ/gQ0vAv OjlIr4ILvZj+gskg5MFDrR0eo3k6bldEDcYfdVwE/2bxlTgRLMTjEHD0eeUB7746BZv8 6icbdhThH3t3KAMjCF3fhqAxKnMhy+oZKfobLM545EGZ77U9SouKeWt2lw4vytUDjRYH JH/FZSYt9mAh6Eodnr/QZ+6E1rKjaI43LPJpGiyPGmiVprPomwobs1fC9CatEFvCRMlI vYfQ==
- In-reply-to: <20160907220701.GA7775@fujitsu.shahaf.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <1473013592-24926-1-git-send-email-danielsh@fujitsu.shahaf.local2> <160907000320.ZM11510@torch.brasslantern.com> <20160907220701.GA7775@fujitsu.shahaf.local2>
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