Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: Update the description of S flag in the completion



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
From c0f421ae9988cb125243845eb3acc59847f818b7 Mon Sep 17 00:00:00 2001
From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
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



Messages sorted by: Reverse Date, Date, Thread, Author