[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ls -Rd behavior
From: |
Eric Blake |
Subject: |
Re: ls -Rd behavior |
Date: |
Fri, 17 Aug 2007 20:37:59 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to John Cowan on 8/17/2007 10:35 AM:
> Eric Blake scripsit:
>
>> Since POSIX states "The use of -d with -R produces unspecified results,"
>> should
>> we change ls to reject -Rd and -dR as invalid option combinations rather
>> than
>> the current behavior of ignoring -R when -d is present?
>
> Better yet, why not DTRT?
The problem is that TRT isn't defined. Suppose you have a/b/c, and pwd is
in a. Should 'ls -dR *' print data on b/c, or stop recursing at b?
Not that I'm opposed to a change in behavior. But it is much quicker to
code up a patch that rejects the combination, since the current semantics
are confusing, than it is to do a more complicated patch and document how
the two interact.
Compare how coreutils behaves for other tough choices, such as
'mv -t dest -T src'.
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGxluH84KuGfSFAYARAucnAJ9IMt+I/pQhnaEQXVdcmFNZtyxcVACePIoK
NfJtW4y+3W5//syj1M1qfl8=
=rDJF
-----END PGP SIGNATURE-----