zsh-workers
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: PATCH: Update the description of S flag in the completion
Date: Mon, 2 Dec 2019 01:31:12 +0100	[thread overview]
Message-ID: <CAKc7PVCu78_O0NGHkDvsGdY5NYqKPuW9_-Zrh_KViZkf4HewXQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 844 bytes --]

Hi,
the current description is:
S  -- search substrings in #, %, / expressions

which:
- is counter the manual and usage-proof, as the flag affects / and //
substitutions only in the non-greedy way.

The patch changes the description to:
S -- match non-greedy in /, // or search substrings in % and # expressions

(the referenced manual fragment is:
       S      Search substrings as well as beginnings or  ends;  with
#  start  from  the
              beginning and with  % start from the end of the string.
With substitution
              via ${.../...} or ${...//...}, specifies non-greedy
matching, i.e. that  the
              shortest instead of the longest match should be replaced.)

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org

[-- Attachment #2: 0001-_brace_parameter-Update-the-description-of-S-flag.patch.2.txt --]
[-- Type: text/plain, Size: 1089 bytes --]

From c0f421ae9988cb125243845eb3acc59847f818b7 Mon Sep 17 00:00:00 2001
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
Date: Mon, 2 Dec 2019 01:16:03 +0100
Subject: [PATCH] _brace_parameter: Update the description of S flag

---
 Completion/Zsh/Context/_brace_parameter | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Completion/Zsh/Context/_brace_parameter b/Completion/Zsh/Context/_brace_parameter
index a9ab44efd..c6e74bf7b 100644
--- a/Completion/Zsh/Context/_brace_parameter
+++ b/Completion/Zsh/Context/_brace_parameter
@@ -177,7 +177,7 @@ if [[ $PREFIX = *'${('[^\)]# ]]; then
     "s:split words on specified string"
     "Z:split words as if zsh command line (with options)"
     # "_:extended flags, for future expansion"
-    "S:search substrings in #, %, / expressions"
+    "S:match non-greedy in /, // or search substrings in % and # 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"
-- 
2.21.0


             reply	other threads:[~2019-12-02  0:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-02  0:31 Sebastian Gniazdowski [this message]
2019-12-02  0:46 ` Sebastian Gniazdowski
2019-12-03  5:16   ` Sebastian Gniazdowski
2019-12-03  9:42     ` Peter Stephenson
2019-12-03 14:45       ` Sebastian Gniazdowski
2019-12-03 10:39   ` Oliver Kiddle

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=CAKc7PVCu78_O0NGHkDvsGdY5NYqKPuW9_-Zrh_KViZkf4HewXQ@mail.gmail.com \
    --to=sgniazdowski@gmail.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).