From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16778 invoked by alias); 28 Jul 2018 08:05:12 -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: List-Unsubscribe: X-Seq: 43217 Received: (qmail 19073 invoked by uid 1010); 28 Jul 2018 08:05:12 -0000 X-Qmail-Scanner-Diagnostics: from wout3-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(64.147.123.19):SA:0(-2.6/5.0):. Processed in 1.717506 secs); 28 Jul 2018 08:05:12 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=sdP3SO FrTZGoT16EmOnUrwImBN59E9TWu/6OmNsK278=; b=eRS+oy6roUbkHBkjjxu+P3 OCqtUWmQtbCi2SJRxCSLeApZHVy01cSAirpEQ0ZfpsAKHCvfgfJnwRHG7ARKdQ8v bYMVEHha/d0RFLZIBAAVzsE7RBFvKfG62EvNFXcJD28K1vMPeYEEfrt7IFxHEaLm Ft+QvHmcnylbCkhw8SPynj3WNKSgiWQAVUc4+f+HR4htcmSGDFo2IQwbG9/VPeyu WCZNcc4Yt3tIsLfEw3tiwpokQ9gnk29gB3gIaBZoGRQJwgxoXGUF7Qnlr8jLfJrH LyeX2qHOLqyPjiygKiQQIMRwXbOhkX872IV3YV7zpBtwXz4UEaF5LGI1W4L3Q1/g == DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=sdP3SO FrTZGoT16EmOnUrwImBN59E9TWu/6OmNsK278=; b=efG0VmAdSnEyGV1Mfowjzq gUyGOZd3BTfStwxIxMGdiWlh8QH001xnLHxiIiaktvEIDIQSd5w9xICQk1J6h+1y f4swk9IGdpmTCFsAP0vJvV3PUo8m7k3ekvgT58394xhkwb1MNY7/qI9ehvIgFKQ9 0cwZG5kzpuo8IKt9DFSDXHfhMacoORS/3qQ5VoiKJI2kDdor6AWVbyfLePF6TrHr 8c81x3fQLl6GqC1xwolos39HQnBS/P5Hv6YVMdjGI8tILKQn/jklgW8eH2DuImPr KPvFFI7JB+EYGfZPofZ1XWLunWznsJ4RxROUMY5kq4c/i9ZF94hxWWYagIJxj16w == X-ME-Proxy: X-ME-Sender: Message-Id: <1532764465.1091676.1455614720.39F6E608@webmail.messagingengine.com> From: Daniel Shahaf To: Joey Pabalinas , Joseph Lee , zsh-workers@zsh.org MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-0843ff3e References: <15e31c7e-4fc4-401a-8320-184f3914e572@Spark> <164debc1328.2878.115d99ba41c6f10c410cad5529ce8e09@gmail.com> Subject: Re: A weird bug of grep completion In-Reply-To: <164debc1328.2878.115d99ba41c6f10c410cad5529ce8e09@gmail.com> Date: Sat, 28 Jul 2018 07:54:25 +0000 Joey Pabalinas wrote on Fri, 27 Jul 2018 16:34 -1000: > On July 27, 2018 4:28:27 PM Joseph Lee wrote: >=20 > > Dear all, > > I'm using macOS 10.13.6, zsh 5.5.1 (x86_64-apple-darwin16.7.0) and grep= (GNU grep) 3.1 packaged by Homebrew. > > A weird behavior happened when completing `grep --no-*` arguments. > > While typing `--no-group-separator`, which is a GNU only argument, afte= r another `--no-*`, the cursor stoped in a wrong place and unable to finish= completion. But it works right when `--no-group-separator` goes ahead. > > > > Words might not be clear, so here's a demo video: > > https://streamable.com/bxbdv > > > > I would appreciate any ideas, thank you. >=20 > You ended up with your cursor one to the left of a - (you can see it=20 > within the block cursor) and that would cause completion to behave a bit= =20 > oddly depending on setopts. To clarify: the bug report is that =C2=ABgrep --no-filename --no=C2=BB= appends a hyphen to $BUFFER but leaves $CURSOR as it was, after the second "--no" rather than after the newly-added hyphen. There's no option whose name is of the form /^--no[^-].*/, so this does see= m to be a bug.