From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] _arguments: Escape colons and backslashes in $opt_args unambiguously.
Date: Wed, 7 Sep 2016 17:13:56 -0700 [thread overview]
Message-ID: <160907171356.ZM14819@torch.brasslantern.com> (raw)
In-Reply-To: <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?
next prev parent reply other threads:[~2016-09-08 1:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-04 18:26 Daniel Shahaf
2016-09-07 7:03 ` Bart Schaefer
2016-09-07 22:07 ` Daniel Shahaf
2016-09-08 0:13 ` Bart Schaefer [this message]
2016-09-08 11:01 ` Daniel Shahaf
2016-09-08 15:49 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=160907171356.ZM14819@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).