[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rm (FU 4.0) odd bug? rm -i accepting 's' as 'y'
From: |
Jim Meyering |
Subject: |
Re: rm (FU 4.0) odd bug? rm -i accepting 's' as 'y' |
Date: |
28 Dec 2000 09:50:43 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.95 |
Pete Krawczyk <address@hidden> wrote:
| address@hidden /tmp]# rm --version
| rm (GNU fileutils) 4.0
| address@hidden /tmp]# ls -al foo
| ls: foo: No such file or directory
| address@hidden /tmp]# touch foo
| address@hidden /tmp]# ls -al foo
| -rw-r--r-- 1 root root 0 Dec 27 14:44 foo
| address@hidden /tmp]# rm -i foo
| rm: remove `foo'? s
| address@hidden /tmp]# ls -al foo
| ls: foo: No such file or directory
|
| Should this be construed as a bug, or is it a feature (perhaps 's' for
| si) and forgotten in the documentation?
At first glance, I'd have said...
Right, assuming `si' in your selected locale means `yes'.
Though if it is an internationalization issue, I would have expected
the prompt string to say not `remove ...', but the translation of `remove'.
| The best I can trace it to is that yesno() uses a regexp, which checks for
| Yy or Nn. But I can't figure out where 's' would cause it to remove the
| file, whereas 'm' wouldn't.
It depends on the locale you're using, since the regexp string
is enclosed in `_(...)'. If you set LC_ALL=C in your environment,
you should get the expected behavior.
In some upcoming release, even the english prompt string will include
the choices.
rm: remove `foo'? (no/yes)
Hmm... I see that the spanish translation of that message already
includes the choices -- at least in the latest test release:
$ grep -A1 '"%s: remove %s? "' po/es.po
msgid "%s: remove %s? "
msgstr "%s: borrar `%s'? (s/n) "