Bug#844710: [Pkg-zsh-devel] Bug#844710: autocorrection suggested rm for typing mr without typing "y"
Control: tag -1 fixed-upstream > # Expected results > > 1. Never autocorrect until I say "y"! > Fixed in commit b3a88a53d379 == 39982. > Ideally also: > > 2. Do not autocorrect to dangerous commands. Not done. If further discussion is needed, it can happen on a new bug.. Cheers, Daniel
Bug#844710: [Pkg-zsh-devel] Bug#844710: autocorrection suggested rm for typing mr without typing "y"
Am Freitag, 18. November 2016, 13:00:24 CET schrieben Sie: > Hi Martin, > > 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 „kernel-ml_archive_2014-1b.gz“ ist nicht möglich: > > Datei oder Verzeichnis nicht gefunden > > > > I didn´t type yes, as when I type "y", it is shown on command line: > > > > ms@intraws:~/Backup/Mail/Linux#1> LANG=C mr test > > zsh: correct 'mr' to 'rm' [nyae]? y > > rm: cannot remove 'test': No such file or directory > > > > And I really didn´t type "y" there, I am pretty sure of that, but I may > > have hit another key by accident. > > Indeed scary. > > 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.) > > 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". > > 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. But I accidentelly typed "mr". And then, yes, likely the spacebar. I think this deserves a fix in the software :) Thanks. -- Martin Steigerwald | Trainer teamix GmbH Südwestpark 43 90449 Nürnberg Tel.: +49 911 30999 55 | Fax: +49 911 30999 99 mail: martin.steigerw...@teamix.de | web: http://www.teamix.de | blog: http://blog.teamix.de Amtsgericht Nürnberg, HRB 18320 | Geschäftsführer: Oliver Kügow, Richard Müller teamix Support Hotline: +49 911 30999-112 *** Bitte liken Sie uns auf Facebook: facebook.com/teamix ***
Bug#844710: [Pkg-zsh-devel] Bug#844710: autocorrection suggested rm for typing mr without typing "y"
Control: tag -1 + confirmed Control: found -1 5.0.7-5 Control: found -1 4.3.17-1 Hi Martin, 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 „kernel-ml_archive_2014-1b.gz“ ist nicht möglich: Datei > oder Verzeichnis nicht gefunden > > I didn´t type yes, as when I type "y", it is shown on command line: > > ms@intraws:~/Backup/Mail/Linux#1> LANG=C mr test > zsh: correct 'mr' to 'rm' [nyae]? y > rm: cannot remove 'test': No such file or directory > > And I really didn´t type "y" there, I am pretty sure of that, but I may > have hit another key by accident. Indeed scary. >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.) 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". So you very likely hit the space bar accidentially. I was able to reproduce this behaviour on Debian 7 Wheezy, Debian 8 Jessie and Debian Sid. > 2. Do not autocorrect to dangerous commands. You might want to have a look at CORRECT_IGNORE in zshall(1). CORRECT_IGNORE=rm did the trick for me. > I think this is an upstream issue and would also report it there, if > it helps. Thanks for the offer, appreciated. And yes, I also think that is very likely an upstream issue, so please do. Write an e-mail to zsh-work...@zsh.org for that. Regards, Axel -- ,''`. | Axel Beckert , http://people.debian.org/~abe/ : :' : | Debian Developer, ftp.ch.debian.org Admin `. `' | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5 `-| 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE