bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Command line parsing of ls with genparse


From: Michael Geng
Subject: Re: [PATCH] Command line parsing of ls with genparse
Date: Tue, 28 Aug 2007 20:33:21 +0200
User-agent: Mutt/1.5.9i

On Tue, Aug 28, 2007 at 10:48:55AM -0700, Eric Blake-1 wrote:
> 
> > 1. The usage function for the ls command has the following 
> >    explanation for the -F, --classify command liune switch:
> >    "append indicator (one of */=>@|) to entries".
> 
> Can you rewrite it as "append indicator (one of *" "/=>@|) to entries",
> and rely on string concatenation to produce the same output?
> 
> -- Eric Blake

In the present version of genparse new strings are always printed
in new lines. For example (also from the ls commmand):

d / directory                   flag    "list directory entries instead of 
contents,"
                                        "  and do not dereference symbolic 
links"

in the genparse (.gp) file is translated into

  -d, --directory            list directory entries instead of contents,\n\
                               and do not dereference symbolic links\n\

in the generated usage() function. Or

NONE / group-directories-first  flag    "" "group directories before files"

could be used to generate

      --group-directories-first\n\
                             group directories before files\n\

in the usage() function.

So presently it doesn't work, but your idea is not bad. I will think 
about it again and maybe change genparse such that multiple comment
strings in the same line will simply be concatenated.

Michael




reply via email to

[Prev in Thread] Current Thread [Next in Thread]