Re: ls --group-directories-first -U

2008-02-12 Thread Jim Meyering
[EMAIL PROTECTED] wrote:
 J Would you *please* consider sending a precise suggestion
 Sorry. OK, To both

 man page:
--group-directories-first
   group directories before files

 And info page:
 `--group-directories-first'
  Group all the directories before the files and then sort the
  directories and the files separately using the selected sort key
  (see -sort option).  That is, this option specifies a primary sort
  key, and the -sort option specifies a secondary key.

 please add:
 Doesn't work if -U or -f are present.

Thanks.
How about the following patch?

I didn't mention -f, since that option is documented to
enable --sort=none (-U) semantics.  I see that you've noticed
--group-directories-first is trumped by --sort=none even when --sort=none
comes first.

Unfortunately, --group-directories-first is a bit of a mess.  Back when
that option was added, I knew that ls should have gained a new method for
specifying multiple sort keys.  Then this option could have been added
as something like --sort=directories-first, and a secondary key would
have been specified via --yet-another-option=SECONDARY_SORT_KEY_TYPE.
But ls was already hairy in that area, too big, and with too many options, etc.

All that to say that I was tempted to change --group-directories-first,
but continue to resist :)

ls: Improve description of --group-directories-first.
* src/ls.c (usage) [--group-directories-first]: Improve description.
* doc/coreutils.texi (Which files are listed): Likewise.
Suggestion from Dan Jacobson.

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index dfab040..fbab0b5 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -5894,6 +5894,8 @@ directories and the files separately using the selected 
sort key
 (see --sort option).
 That is, this option specifies a primary sort key,
 and the --sort option specifies a secondary key.
+However, any use of @option{--sort=none}
+(@option{-U}) disables this option altogether.

 @item --hide=PATTERN
 @opindex [EMAIL PROTECTED]
diff --git a/src/ls.c b/src/ls.c
index 46713f2..e0646ef 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -4386,7 +4386,9 @@ Mandatory arguments to long options are mandatory for 
short options too.\n\
 ), stdout);
   fputs (_(\
   --group-directories-first\n\
- group directories before files\n\
+ group directories before files.\n\
+   disable with --sort=none (-U);\n\
+   augment with any other --sort option\n\
 ), stdout);
   fputs (_(\
   -G, --no-group in a long listing, don't print group names\n\
--
1.5.4.1.98.gf3293


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: ls --group-directories-first -U

2008-02-12 Thread Bert Wesarg
Hi Jim,

have you ever consider my follow-up patch to patch#3596 with the name:
ls_--group-directories-first_symlinks_to_dir_are_dirs_too.patch?

Thanks.

Bert


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: ls --group-directories-first -U

2008-02-12 Thread jidanni
JM +(@option{-U}) disables this option altogether.
Looks good.

JM + disable with --sort=none (-U);\n\
Looks bad. One thinks disable by not using it in the first place.
Just word it like the first one above.

Yes the options are so complicated that one needs a n-to-the-nth-power
grid chart to sort out all their interactions... so one can only make
observations.


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: ls --group-directories-first -U

2008-02-11 Thread jidanni
J Would you *please* consider sending a precise suggestion
Sorry. OK, To both

man page:
   --group-directories-first
  group directories before files

And info page:
`--group-directories-first'
 Group all the directories before the files and then sort the
 directories and the files separately using the selected sort key
 (see -sort option).  That is, this option specifies a primary sort
 key, and the -sort option specifies a secondary key.

please add:
Doesn't work if -U or -f are present.


P.S., can't mail you via my smarthost
mx.meyering.net[82.230.74.64] said: 554 5.7.1
hapkido.dreamhost.com[66.33.216.122]: Client host rejected: Access denied


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


ls --group-directories-first -U

2008-02-11 Thread jidanni
Mention in the ls docs at --group-directories-first, that -U nullifies
its effects, sorry :-)
ls (GNU coreutils) 6.10


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils