From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7217 invoked by alias); 18 Nov 2016 13:24:36 -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: 39976 Received: (qmail 9533 invoked from network); 18 Nov 2016 13:24:36 -0000 X-Qmail-Scanner-Diagnostics: from mailout.teamix.de 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(194.150.191.118):SA:0(-2.9/5.0):. Processed in 2.327138 secs); 18 Nov 2016 13:24:36 -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.9 required=5.0 tests=RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: martin.steigerwald@teamix.de X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at teamix.de does not designate permitted sender hosts) From: Martin Steigerwald To: CC: <844710@bugs.debian.org>, Axel Beckert Subject: Fwd: Re: [Pkg-zsh-devel] Bug#844710: autocorrection suggested rm for typing mr without typing "y" Date: Fri, 18 Nov 2016 14:15:51 +0100 Message-ID: <3574167.p9ErITdPmY@merkaba> Organization: teamix GmbH User-Agent: KMail/5.2.3 (Linux/4.8.0-1-amd64; KDE/5.27.0; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-EXCLAIMER-MD-CONFIG: a9df7ef8-491e-4414-ab39-652b660186c0 X-EXCLAIMER-MD-BIFURCATION-INSTANCE: 0 =EF=BB=BFDear Z-Shell developers, I want to make you aware of the following issue with autocorrection I ran=20 into: autocorrection suggested rm for typing mr without typing "y" https://bugs.debian.org/844710 Axel analysed this below a bit further an indeed, if I press the space bar,= I=20 get this: ms@merkaba:~> cd /tmp =20 ms@merkaba:/tmp> LANG=3DC mr test zsh: correct 'mr' to 'rm' [nyae]? =20 rm: cannot remove 'test': No such file or directory ms@merkaba:/tmp#1> So two fixes to consider: 1) Don=C2=B4t confirm on space, as thats to easy to trigger accidentally. := ) 2) Don=C2=B4t autocorrect to dangerous commands like "rm". Could be a bit=20 challenging to make a list of commands which are dangerous and can easily=20 trigger unwanted actions. "rm" would IMO definately be one of this, while w= ith=20 "dd" it would be harder to trigger an unwanted action by accident due to=20 syntax requirements. Axel made me aware that I tell Z-Shell to ignore dangerous commands with=20 CORRECT_IGNORE=3Drm, but I think it would be good to reconsider the standar= d=20 behavior. Thank you, Martin ---------- Weitergeleitete Nachricht ---------- Betreff: Re: [Pkg-zsh-devel] Bug#844710: autocorrection suggested rm for=20 typing mr without typing "y" Datum: Freitag, 18. November 2016, 13:59:34 CET Von: Martin Steigerwald An: Axel Beckert Kopie: 844710@bugs.debian.org Am Freitag, 18. November 2016, 13:00:24 CET schrieben Sie: > Hi Martin, >=20 > Martin Steigerwald wrote: > > ms@intraws:~/Backup/Mail/Linux> mr kernel-ml_archive.gz > > kernel-ml_archive_2014-1b.gz zsh: correct 'mr' to 'rm' [nyae]? > > rm: das Entfernen von =E2=80=9Ekernel-ml_archive_2014-1b.gz=E2=80=9C is= t nicht m=C3=B6glich: > > Datei oder Verzeichnis nicht gefunden > >=20 > > I didn=C2=B4t type yes, as when I type "y", it is shown on command line= : > >=20 > > ms@intraws:~/Backup/Mail/Linux#1> LANG=3DC mr test > > zsh: correct 'mr' to 'rm' [nyae]? y > > rm: cannot remove 'test': No such file or directory > >=20 > > And I really didn=C2=B4t type "y" there, I am pretty sure of that, but = I may > > have hit another key by accident. >=20 > Indeed scary. >=20 > From the output it look to as if "Enter" had been pressed on a > first glance. But if I press "Enter" (on Sid at least) it shows an "n" > instead afterwards. (Since I have mr installed, I tested it with "rmm" > which is only available if nmh or mailutils-mh is installed.) >=20 > After some experimenting I noticed that while pressing Enter is > equivalent to pressing "n" and also prints an "n", pressing the space > bar is equivalent to "y" _without_ printing a "y". >=20 > So you very likely hit the space bar accidentially. Yikes! Space bar to confirm? And correction to "rm". Actually what I tried to type was "mv". I obviously wanted to move the file= .=20 But I accidentelly typed "mr". And then, yes, likely the space bar. I think this deserves a fix in the software :) Thanks. ------------------------------------------------------------- --=20 Martin Steigerwald | Trainer teamix GmbH S=C3=BCdwestpark 43 90449 N=C3=BCrnberg Tel.: +49 911 30999 55 | Fax: +49 911 30999 99 mail: martin.steigerwald@teamix.de | web: http://www.teamix.de | blog: htt= p://blog.teamix.de Amtsgericht N=C3=BCrnberg, HRB 18320 | Gesch=C3=A4ftsf=C3=BChrer: Oliver K= =C3=BCgow, Richard M=C3=BCller teamix Support Hotline: +49 911 30999-112 =20 *** Bitte liken Sie uns auf Facebook: facebook.com/teamix ***