From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21971 invoked by alias); 19 Nov 2016 22:06:13 -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: 39988 Received: (qmail 25649 invoked from network); 19 Nov 2016 22:06:13 -0000 X-Qmail-Scanner-Diagnostics: from out5-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(66.111.4.29):SA:0(-0.7/5.0):. Processed in 1.852244 secs); 19 Nov 2016 22:06:13 -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=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW, T_DKIM_INVALID autolearn=unavailable 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: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=L5DHJpRc5bJNydm Ef1RLMHVjrV0=; b=SbqLt7C18fB6/f8Sgiim54Gad0/+OR63ZvCMaD1MGBpVhXk sSS5tGaTPXPIhLc8ZHgs6/6HFjDChEUNVo3noSG+Mm2O5Cr3bV2VyYCVyZ1ZxF0j aH6/3gUwSj3fXxsjcXAaVgPkbvxvD34YGqZOVUjkRZiqUGO3uA/qnVqIETLY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=L5DHJpRc5bJNyd mEf1RLMHVjrV0=; b=gSLf8/418Wz/bLfwRx3z/lKFVfXv1eV3NX4cbYJfMa5yAC oZOpQ0PNCtgnmOu9R1SR6qjwUX8wI/sXvFQek+ya0AvAE1yAx5dkD9oF12a4Si6H NHs8sLJXp2zc9/Ep7TtsmfkqRmp5omb2W7J6HCBxU6ydSO5+YggtagwuPlZ44= X-ME-Sender: X-Sasl-enc: s59qGkKQMgJwUOB7VCGVFao2aJwXGlPn8xoDO4ifYju7 1479592590 Date: Sat, 19 Nov 2016 21:54:05 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Cc: 844710@bugs.debian.org Subject: Re: Bug#844710: Fwd: Re: [Pkg-zsh-devel] Bug#844710: autocorrection suggested rm for typing mr without typing "y" Message-ID: <20161119215405.GA24755@fujitsu.shahaf.local2> References: <3574167.p9ErITdPmY@merkaba> <20161119075542.GA6750@fujitsu.shahaf.local2> <161119100023.ZM13994@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <161119100023.ZM13994@torch.brasslantern.com> User-Agent: Mutt/1.5.23 (2014-03-12) Bart Schaefer wrote on Sat, Nov 19, 2016 at 10:00:23 -0800: > On Nov 19, 7:55am, Daniel Shahaf wrote: > } Subject: Re: Bug#844710: Fwd: Re: [Pkg-zsh-devel] Bug#844710: autocorrecti > } > } Martin Steigerwald wrote on Fri, Nov 18, 2016 at 14:15:51 +0100: > } > So two fixes to consider: > } > > } > 1) Don't confirm on space, as thats to easy to trigger accidentally. :) > } > } The code confirms on both tabs (since commit 7f1ce570) and spaces (since > } before CVS). Does anyone know a reason for doing this? > > If you have a look at the zsh-workers article referenced by 7f1ce570, > you'll see that both space and tab date from time immemorial; the patch > in 7f1ce570 actually REMOVES the interpretation of tab as "yes" from > the NO_RM_STAR_SILENT option, it didn't change CORRECT handling. > I had looked at it, but missummarized it. Mea culpa. > Why it's this way probably has more to do with Paul Falstad's typing > habits than anything else. If you're used to hitting space or tab at > a completion, and most of the time you believe the correction, then > you probably want space and tab to mean "go ahead" anytime the shell > is waiting for something. > > Notice the RM_STAR_WAIT option for a similar situation. > > While I don't use CORRECT and therefore personally don't much care > what this prompt does, I question whether one person remarking about > this after 25+ years of it being the way it has been, is a sufficient > reason for us to immediately change it. I didn't write the patch because a guy on the internet suggested it. I wrote the patch because the semantics of tab and space at that point are undocumented and I had been convinced by the argument that using space to accept a correction violates the principle of least surprise. If we do keep space and tab then we should document them. Daniel