From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 4338 invoked from network); 10 Apr 2021 08:39:12 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 10 Apr 2021 08:39:12 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1618043952; b=aE9au/mznvr9Lz39mbF2lTNKpoW34+KccCzYlFSkqMuLFvvXidHBTUBzz712W/EHy//UjOhOqY rfV7JjCGjIOO9vt2yNDgo/Qaza/rjLDGhk6TxL+Lcipib4Zb+VzLq60LBY34l3FYiLQpMH5JI0 4bIdluVv/0X/eYVjxiUSRMHK5cLFxnCniTmuQQdLALt5qIsdQQGGfv+EO783BU845dJAHy7u89 iHsVLLM2z8Rom89K6w2+Zd+FcFv4QfX1I+ZhND28co8qV7u/XoMN58vSMMLXGYjCeCN9ikBX95 FrCEDeFqw8sVUf8odgRGBGwoN+19u4YoNBRMZyPFvXSXFA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (aurora-borealis.phear.org) smtp.remote-ip=188.42.45.194; dkim=pass header.d=phear.org header.s=20180217 header.a=rsa-sha256; dmarc=none header.from=phear.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1618043952; bh=LYnNYNPTPJZuZyHMt7nsH2zYYrQyyOcfoFsm6Qt0cfM=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:DKIM-Signature:DKIM-Signature; b=y63i1EcqcotL2P3RSX61tTXZDAIc5ADtzrBpSnXZP+BZNhVNPyK4v/mJ0+Fcx7jnMxeaj5+tjU i7zrXtW1KghyhCC+kKP6a3aQdvAvYD2GBxvTQMVqbmvW3CVDPE1649iJ8gqhX72hNMtl9p0hra Cozc15/H0Z2oaWhF/B16rMV2gYCzAu9I7y30bPtczADN+j3Eweg+p+jv7GL146neSV608v7UWu hljFmzfIHwOoQ2OzMw/04kOvMrNUNgIvyQEihzV5RwCsEsloh+bdFLFuAatKQKNKqC6ou75fmD pryY1/W/r1kGBrQZPtv9CEUeKGuq4Fh/7QUvttOXA8RFog==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=PWoVLXF8xGL5UxjfFdbfZlSj8iu5e6BobRirAN+Os4Y=; b=R/LCYI6NY1+ryd8OfYiQbcXT+K tqmoBdOYYtyp1HANvdwTeqhcYs+lBeE73Lujld+jyKlKpXDOn2dwrTOXOsDc4Beq0DFVcLjyNLXxY 0BTIt7xhHd8c/Iqt/vKQ3D0BklmyAaULi1Oum0CILstM9LA9iFt/CjUMA8hM5iL0cFNPZFfhdkl4e 2hMNdw5Fiexkjo+MrV/HvkTbbNkztrI6LP7E65VyjEOhHv9AS3gErbKckVBWwuvZtUYELLUs1f4Y4 1jVCT8VpBBmWScV8XViMTskExYZiUu5TS2z35qZ0bpQTbCnQGdy+IN3edB6M2lu+Bl3+xAUYHYXvK jVq1U0PQ==; Received: from authenticated user by zero.zsh.org with local id 1lV995-0008cw-7r; Sat, 10 Apr 2021 08:39:11 +0000 Authentication-Results: zsh.org; iprev=pass (aurora-borealis.phear.org) smtp.remote-ip=188.42.45.194; dkim=pass header.d=phear.org header.s=20180217 header.a=rsa-sha256; dmarc=none header.from=phear.org; arc=none Received: from aurora-borealis.phear.org ([188.42.45.194]:32972) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1lV98Y-0008MQ-R8; Sat, 10 Apr 2021 08:38:40 +0000 Received: from localhost (unknown [127.0.0.1]) by aurora-borealis.phear.org (Postfix) with ESMTP id 980B1FF33; Sat, 10 Apr 2021 08:38:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at phear.org Received: from aurora-borealis.phear.org ([127.0.0.1]) by localhost (mail.phear.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ws_G2eSlM58z; Sat, 10 Apr 2021 08:38:32 +0000 (UTC) Received: from prometheus.u-strasbg.fr (82-65-50-238.subs.proxad.net [82.65.50.238]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: khatar) by aurora-borealis.phear.org (Postfix) with ESMTPSA id 85C3BFF32; Sat, 10 Apr 2021 08:38:32 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.10.3 aurora-borealis.phear.org 85C3BFF32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=phear.org; s=20180217; t=1618043912; bh=LYnNYNPTPJZuZyHMt7nsH2zYYrQyyOcfoFsm6Qt0cfM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Nsnj1MJVMeSOzV3RLe+WFvH6hBXsz+khPCVkGucwTVqS20ZrQaUrsBEn/tKkr9N4x Ncj6EwZ0TEt34FkDbKSBnck069zYyPI4uOa1x+s9mIbK/+0uNYIxH8qAkH8xttcZzA JYdE2jv/7rcZUxE3Akg5hYS+ZcTnLpM/CW7huMfUWNrVLeoQV4XLHWPhTQZTrC8X4F w0n1hxi/LzhQ8xXyXdMsh/JcwSEk+YWqM7OxyNbX5a8tMsrK9UnvrbVaFVHluR9QBT VtVyAZtXpxOi7q5odGFeRtBXlLIN99mlXjBugV2BeXUrAS8k4oJllht2SNvkB7eKGi tMBOCUOWJGGVA== Date: Sat, 10 Apr 2021 10:38:31 +0200 From: Marc Chantreux To: Oliver Kiddle Cc: Zsh hackers list Subject: Re: 2 new patches for _surfraw Message-ID: References: <84376-1618005187.938917@aiYa.Xwq7.uanX> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="zvw5pmCt2p2vnJEr" Content-Disposition: inline In-Reply-To: <84376-1618005187.938917@aiYa.Xwq7.uanX> X-Seq: 48466 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: --zvw5pmCt2p2vnJEr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline hello, > This mostly looks all good so there's not much I can say. yet: i want to read carefully and learn about the completion primitives before submitting a new version so let's focus on the second patch for the moment (easier and actually fixing a bug). i propose 2 versions of the patch. the second one also * remove the other tailing spaces * remove some tabs in the indentation * declare the correct indentation in a vim mode regards marc --zvw5pmCt2p2vnJEr Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-fix-ebay-completion-bug-due-to-tailing-space.patch" >From 6367f7dae6bfe27d6580d68ecc87eece8caa845b Mon Sep 17 00:00:00 2001 From: Marc Chantreux Date: Sat, 10 Apr 2021 10:25:02 +0200 Subject: [PATCH] fix ebay completion bug due to tailing space also * remove the other tailing spaces * remove some tabs in the indentation * declare the correct indentation in a vim mode --- Completion/Unix/Command/_surfraw | 61 ++++++++++++++++---------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/Completion/Unix/Command/_surfraw b/Completion/Unix/Command/_surfraw index f945f1ca9..b480e3c28 100644 --- a/Completion/Unix/Command/_surfraw +++ b/Completion/Unix/Command/_surfraw @@ -1,4 +1,5 @@ #compdef surfraw sr +# vim: et ts=2 local curcontext="$curcontext" expl state line args ret=1 @@ -64,10 +65,10 @@ case $state in '*:search string' && ret=0 ;; ctan) - _arguments $args \ - '-name[search by filename]' \ - '-desc[search descriptions (default)]'\ - '-doc[search documentation]' + _arguments $args \ + '-name[search by filename]' \ + '-desc[search descriptions (default)]'\ + '-doc[search documentation]' ;; currency) _arguments \ @@ -165,7 +166,7 @@ case $state in ;; debsec) _message -e string 'package name, bug number or CVE ID' - ;; + ;; deja) _arguments $args \ '-results=-:[number of results to return]' \ @@ -183,7 +184,7 @@ case $state in ;; ebay) _arguments $args \ - '-country=-:country:(com de uk fr)' \ + '-country=-:country:(com de uk fr)' \ '-results=-:[number of results to return]:number' && ret=0 ;; etym) @@ -220,7 +221,7 @@ case $state in _deb_packages avail && ret=0 ;; fsfdir) - _arguments $args + _arguments $args ;; google) _arguments $args \ @@ -229,19 +230,19 @@ case $state in '-search=-:topic:(bsd linux mac unclesam)' && ret=0 ;; gutenberg) - _arguments $args \ - '-title[search titles (default)]' - '-author[search authors]' - '-num[search etext numbers]' - ;; + _arguments $args \ + '-title[search titles (default)]' + '-author[search authors]' + '-num[search etext numbers]' + ;; imdb) _arguments $args \ '-category=-:category:(All Titles MyMovies People Characters Quotes Bios Plots)' && ret=0 ;; ixquick) - _arguments $args \ - '-search=-:search type:(web pics)' \ - '-lang=-:language:(english dansk deutsch espanol francais italiano nederlands norsk polski portugues suomi svenska turkce jiantizhongwen nihongo fantizhengwen hangul)' + _arguments $args \ + '-search=-:search type:(web pics)' \ + '-lang=-:language:(english dansk deutsch espanol francais italiano nederlands norsk polski portugues suomi svenska turkce jiantizhongwen nihongo fantizhengwen hangul)' ;; jake) _arguments $args \ @@ -386,20 +387,20 @@ case $state in :URL:_urls && ret=0 ;; wayback) - _arguments $args \ - '-syear=-[start search from this year]:year' \ - '-smonth=-:[start search from this month]:month:(jan feb mar apr may jun jul aug sep oct nov dec)' \ - '-sday=-[start search from this day]:number' \ - '-eyear=-[end search in this year]:year' \ - '-emonth=-[end search in this month]:month:(jan feb mar apr may jun jul aug sep oct nov dec)' \ - '-eday=-[end search in this day]:number' \ - '-list[list all pages that match search criteria]' \ - '-dups[show dups]' \ - '-compare[compare pages]' \ - '-pdf[show as PDF]' \ - '-alias=-[how to handle site aliases]:alias:(merge show hide)' \ - '-redir=-[how to handle redirections]:redir:(hide flag show)' \ - '-type=-[file type to search for]:type:(image audio video binary text pdf)' + _arguments $args \ + '-syear=-[start search from this year]:year' \ + '-smonth=-:[start search from this month]:month:(jan feb mar apr may jun jul aug sep oct nov dec)' \ + '-sday=-[start search from this day]:number' \ + '-eyear=-[end search in this year]:year' \ + '-emonth=-[end search in this month]:month:(jan feb mar apr may jun jul aug sep oct nov dec)' \ + '-eday=-[end search in this day]:number' \ + '-list[list all pages that match search criteria]' \ + '-dups[show dups]' \ + '-compare[compare pages]' \ + '-pdf[show as PDF]' \ + '-alias=-[how to handle site aliases]:alias:(merge show hide)' \ + '-redir=-[how to handle redirections]:redir:(hide flag show)' \ + '-type=-[file type to search for]:type:(image audio video binary text pdf)' ;; wetandwild) _arguments \ @@ -430,6 +431,6 @@ case $state in _wanted elvi expl elvi compadd \ ${${${(f)"$(_call_program elvi surfraw -elvi)"}%%[[:space:]]##--*}%:*} && ret=0 ;; -esac +esac return ret -- 2.30.2 --zvw5pmCt2p2vnJEr Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-fix-ebay-completion-bug-due-to-tailing-space.patch~" >From dc4484bac85609faf5cc8057fc5d2b991f9b1c91 Mon Sep 17 00:00:00 2001 From: Marc Chantreux Date: Sat, 10 Apr 2021 10:25:02 +0200 Subject: [PATCH] fix ebay completion bug due to tailing space also remove the other tailing spaces --- Completion/Unix/Command/_surfraw | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Completion/Unix/Command/_surfraw b/Completion/Unix/Command/_surfraw index f945f1ca9..b8a3033c0 100644 --- a/Completion/Unix/Command/_surfraw +++ b/Completion/Unix/Command/_surfraw @@ -165,7 +165,7 @@ case $state in ;; debsec) _message -e string 'package name, bug number or CVE ID' - ;; + ;; deja) _arguments $args \ '-results=-:[number of results to return]' \ @@ -183,7 +183,7 @@ case $state in ;; ebay) _arguments $args \ - '-country=-:country:(com de uk fr)' \ + '-country=-:country:(com de uk fr)' \ '-results=-:[number of results to return]:number' && ret=0 ;; etym) @@ -233,7 +233,7 @@ case $state in '-title[search titles (default)]' '-author[search authors]' '-num[search etext numbers]' - ;; + ;; imdb) _arguments $args \ '-category=-:category:(All Titles MyMovies People Characters Quotes Bios Plots)' && ret=0 @@ -430,6 +430,6 @@ case $state in _wanted elvi expl elvi compadd \ ${${${(f)"$(_call_program elvi surfraw -elvi)"}%%[[:space:]]##--*}%:*} && ret=0 ;; -esac +esac return ret -- 2.30.2 --zvw5pmCt2p2vnJEr--