zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: Work around broken case parsing
@ 2015-05-19  6:44 Mikael Magnusson
  2015-05-19  8:54 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Mikael Magnusson @ 2015-05-19  6:44 UTC (permalink / raw)
  To: zsh-workers

This patch is incomplete because I realized this was getting ridiculous.

---
 Completion/Linux/Command/_lsusb   | 4 ++--
 Completion/Linux/Command/_ss      | 2 +-
 Completion/Unix/Command/_locate   | 4 ++--
 Completion/Unix/Command/_nslookup | 2 +-
 Completion/Unix/Command/_twidge   | 6 +++---
 Completion/X/Command/_dcop        | 6 +++---
 Completion/Zsh/Context/_subscript | 2 +-
 7 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/Completion/Linux/Command/_lsusb b/Completion/Linux/Command/_lsusb
index 17240e0..8641379 100644
--- a/Completion/Linux/Command/_lsusb
+++ b/Completion/Linux/Command/_lsusb
@@ -16,11 +16,11 @@ _arguments \
   while IFS="" read usbidsline
   do
     case "$usbidsline" in
-      ((#b)([0-9a-f]##) ##(*))
+      ((#b)([0-9a-f]##)\ ##(*))
         vendorid="$match[1]"
         _lsusb_vendors[$vendorid]="$match[2]"
       ;;
-      (	(#b)([0-9a-f]##) ##(*)))
+      ((\	(#b)([0-9a-f]##)\ ##(*)))
         pair="$vendorid:$match[1]"
         _lsusb_devices[${pair}]="$match[2]"
       ;;
diff --git a/Completion/Linux/Command/_ss b/Completion/Linux/Command/_ss
index 95aa798..1acb9b9 100644
--- a/Completion/Linux/Command/_ss
+++ b/Completion/Linux/Command/_ss
@@ -35,7 +35,7 @@ _arguments -C -s \
 
 if [[ -n $state ]]; then
   case $words[CURRENT-1] in
-  (d|s)port)
+  ((d|s)port)
     _wanted operators expl operator \
       compadd \< \> \= \>= \<= \== \!= eq ge gt lt le ne && ret=0
   ;;
diff --git a/Completion/Unix/Command/_locate b/Completion/Unix/Command/_locate
index 694f506..6de8d0f 100644
--- a/Completion/Unix/Command/_locate
+++ b/Completion/Unix/Command/_locate
@@ -17,11 +17,11 @@ case $basename in
     ltype=mlocate
     ;;
 
-    (*(#i)secure locate*)
+    (*(#i)secure\ locate*)
     ltype=slocate
     ;;
 
-    (*(#i)gnu locate*|*findutils*gnu*)
+    (*(#i)gnu\ locate*|*findutils*gnu*)
     ltype=gnu
     ;;
 
diff --git a/Completion/Unix/Command/_nslookup b/Completion/Unix/Command/_nslookup
index 9bc80ab..c099a45 100644
--- a/Completion/Unix/Command/_nslookup
+++ b/Completion/Unix/Command/_nslookup
@@ -86,7 +86,7 @@ if [[ -n "$compcontext" ]]; then
   fi
 
   case "$words[1]" in
-  (|l)server)
+  ((|l)server)
     _wanted hosts expl 'new default server' _hosts
     return
     ;;
diff --git a/Completion/Unix/Command/_twidge b/Completion/Unix/Command/_twidge
index d8b3b3d..bb86f7b 100644
--- a/Completion/Unix/Command/_twidge
+++ b/Completion/Unix/Command/_twidge
@@ -48,16 +48,16 @@ function _twidge_args {
 		lsarchive)
 			_arguments $args_common $args_more $args_other
 			;;
-		ls(dm(|archive)|recent|replies|rt(|archive|replies)))
+		(ls(dm(|archive)|recent|replies|rt(|archive|replies)))
 			_arguments $args_common $args_more
 			;;
-		lsfollow(ers|ing))
+		(lsfollow(ers|ing))
 			_arguments $args_common :username
 			;;
 		dmsend)
 			_arguments :recipient :status
 			;;
-		(un|)follow)
+		((un|)follow)
 			_message username
 			;;
 		update)
diff --git a/Completion/X/Command/_dcop b/Completion/X/Command/_dcop
index a0329e1..ea44369 100644
--- a/Completion/X/Command/_dcop
+++ b/Completion/X/Command/_dcop
@@ -5,7 +5,7 @@ local app obj fun
 local -a state line expl
 
 case $service in
-  dcop(client|object))
+  (dcop(client|object))
     state=( dcopref )
     max=2
   ;;
@@ -84,8 +84,8 @@ while (( $#state )); do
 	fi
 	case $arg in
 	  bool*) _wanted argument expl "$desc" compadd true false && return ;;
-	  (#i)*(file|path|dir)*) _wanted argument expl "$desc" _files && return ;;
-	  (#i)*url*) _wanted argument expl "$desc" _urls && return ;;
+	  ((#i)*(file|path|dir)*) _wanted argument expl "$desc" _files && return ;;
+	  ((#i)*url*) _wanted argument expl "$desc" _urls && return ;;
 	  *) _message -e argument "$desc" ;;
 	esac
       else
diff --git a/Completion/Zsh/Context/_subscript b/Completion/Zsh/Context/_subscript
index 0ccc0c4..12a802b 100644
--- a/Completion/Zsh/Context/_subscript
+++ b/Completion/Zsh/Context/_subscript
@@ -61,7 +61,7 @@ elif compset -P '\('; then
       '(r R k K i)I[all keys matched by subscript as pattern]'
       'e[interpret * or @ as a single key]'
     );;
-    (|scalar*)) flags=(
+    ((|scalar*)) flags=(
       'w[make subscripting work on words of scalar]'
       's[specify word separator]'
       'p[recognise escape sequences in subsequent s flag]'
-- 
2.4.0


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

* Re: PATCH: Work around broken case parsing
  2015-05-19  6:44 PATCH: Work around broken case parsing Mikael Magnusson
@ 2015-05-19  8:54 ` Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2015-05-19  8:54 UTC (permalink / raw)
  To: zsh-workers

On Tue, 19 May 2015 08:44:49 +0200
Mikael Magnusson <mikachu@gmail.com> wrote:
> This patch is incomplete because I realized this was getting ridiculous.

That's a lot more re-interpreted initial parentheses than I was
expecting...  Maybe we will need a special case fot that.

The white space quoting should get fixed.

I don't think you should need any fixes for parentheses that occur in
balanced groups where there's no leading parenthesis.

pws


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

end of thread, other threads:[~2015-05-19  8:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-19  6:44 PATCH: Work around broken case parsing Mikael Magnusson
2015-05-19  8:54 ` Peter Stephenson

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