zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: Update the description of S flag in the completion
@ 2019-12-02  0:31 Sebastian Gniazdowski
  2019-12-02  0:46 ` Sebastian Gniazdowski
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Gniazdowski @ 2019-12-02  0:31 UTC (permalink / raw)
  To: Zsh hackers list

[-- 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-12-03 14:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-02  0:31 PATCH: Update the description of S flag in the completion Sebastian Gniazdowski
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

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).