Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] Fix inaccuracies in _brace_parameter completion wording
- X-seq: zsh-workers 41826
- From: dana <dana@xxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] Fix inaccuracies in _brace_parameter completion wording
- Date: Sat, 7 Oct 2017 02:44:09 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=fSEH+5uKL/zapIFl2f4gz6O8B2qFyTy4giqdwgrjDyg=; b=BEu1a3T7icPJvvxCzCfT0dct/QzakrM8PtLUAol3Db9hdYf6WsrZXriN0HmNFPtalB CQ1eRVEWSYolHpVJp605ohFb5RkDgIJwGDaFUXeGmAm/Qu1PV+LstzCt0WsZZtKHjkzA dyR3q11iNIP9RmnPseMjBKOMuBcyJJXGZz0WptNYlUGF+xxYSpqnaQT6+RYubk2/Ea3O xvHnZENDq4UDUmL6p4VR4tITw/KE7WpSIvrBfJFp5mOTcUAvs4zJpYQHi/+e6QaTtZfE lA02hGIUoFR1puNSYuggYD4DgIUDh4Ml2caweRomJ1CR08qymK6Oh3CkaQdCILX8d6VY Ry8w==
- 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
The _brace_parameter completion function indicates that the expansion flags
B, E, M, and R can be used with the ${foo/bar/baz} syntax. According to the
documentation (zshexpn), this is not so:
The following flags are meaningful with the ${...#...} or ${...%...} forms.
> The S and I flags may also be used with the ${.../...} forms.
>
Testing and a brief glance at the source seem to confirm this, though my C
is not great — please let me know if i'm mistaken.
Credit to psprint in #zsh for discovering the wording problem.
dana
diff --git a/Completion/Zsh/Context/_brace_parameter
b/Completion/Zsh/Context/_brace_parameter
index f22db8895..b119ccd11 100644
--- a/Completion/Zsh/Context/_brace_parameter
+++ b/Completion/Zsh/Context/_brace_parameter
@@ -178,11 +178,11 @@ if [[ $PREFIX = *'${('[^\)]# ]]; then
# "_:extended flags, for future expansion"
"S:search substrings in #, %, / expressions"
"I:search <argument>th match in #, %, / expressions"
- "B:include index of beginning of match in #, %, / expressions"
- "E:include index of one past end of match in #, %, / expressions"
- "M:include matched portion in #, %, / expressions"
+ "B:include index of beginning of match in #, % expressions"
+ "E:include index of one past end of match in #, % expressions"
+ "M:include matched portion in #, % expressions"
"N:include length of match in #, % expressions"
- "R:include rest (unmatched portion) in #, %, / expressions"
+ "R:include rest (unmatched portion) in #, % expressions"
)
_describe -t flags "parameter flag" flags -Q -S ''
return
Messages sorted by:
Reverse Date,
Date,
Thread,
Author