[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rm --p
From: |
Jim Meyering |
Subject: |
Re: rm --p |
Date: |
Sat, 03 Dec 2005 23:26:53 +0100 |
Eric Blake <address@hidden> wrote:
> According to Jim Meyering on 12/3/2005 2:19 PM:
>> Thanks for the prod.
>> I don't know of a mechanism in getopt_long to do that.
>> But it is worth changing.
>> I'll probably just add a leading `-' to the
>> undocumented (for-testing-only) option name.
>
> Indeed, rm ---presume-input-tty is quite slick for letting rm --p always
> stand for rm --preserve-root. You should also change tail --p (--pid is
> desired, not --presume-input-pipe), and for symmetry, fix head --p (not
> ambiguous, but again it should be ---presume-input-pipe for tests only).
Thanks.
I've just done that.
2005-12-03 Jim Meyering <address@hidden>
* src/rm.c (long_opts): Change the name of each undocumented, for-
testing-only option to start with `-', so that it cannot render
ambiguous any prefix it happens to share with some other option name.
Problem reported by Eric Blake.
* src/head.c (long_options): Likewise.
* src/tail.c (long_options): Likewise.
* tests/misc/head-elide-tail: Update uses of undocumented, for-
testing-only --presume* options to start with `---'.
* tests/rm/dangling-symlink: Likewise.
* tests/rm/dir-no-w: Likewise.
* tests/rm/isatty: Likewise.
- rm --p, Eric Blake, 2005/12/03