From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8490 invoked by alias); 19 May 2015 06:45:00 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 35214 Received: (qmail 15962 invoked from network); 19 May 2015 06:44:58 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=T0pUR3Xw9ahd5w7nEwXmepZndQ33RU8GKBtre1BqUV4=; b=LmV9hxGrp8TsZ9ZEpnlNPcpMzuV5fM2tcU3pqlrq483bCFSE8xTMUkJlnajjqRZ749 jy79hK6cttBy6uMXSXHy/PEkwshEuONNezslX15psiuSdw2X4tAV2ANawxwOb3U7gsor HqsDKga4dALSAtJNF2tbtMWIB0y7MQnzmrv79jAXcLFZaZ2uvc+EbGElzGdUP4zYMFPt qSWUXVKBJz7uFtbOtgR4wIIuQcFsgLrUhNeQZiS/Pc1a9AlLq4AswmYn0ZPamwYZwJFD oVPPVlthMeT4gKAf1M6+ahcZCUa81THaDRXaZ3RIAsC/DUDzb4C51SsEk5HV4l9HxUrS 7kRQ== X-Received: by 10.194.187.170 with SMTP id ft10mr29399708wjc.26.1432017895939; Mon, 18 May 2015 23:44:55 -0700 (PDT) From: Mikael Magnusson To: zsh-workers@zsh.org Subject: PATCH: Work around broken case parsing Date: Tue, 19 May 2015 08:44:49 +0200 Message-Id: <1432017889-21585-1-git-send-email-mikachu@gmail.com> X-Mailer: git-send-email 2.4.0 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