bug-findutils
[Top][All Lists]
Advanced

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

Re: Quoting of unprintable characters in the output of find


From: James Youngman
Subject: Re: Quoting of unprintable characters in the output of find
Date: Mon, 12 Dec 2005 06:47:53 +0000
User-agent: Mutt/1.5.9i

On Wed, Dec 07, 2005 at 06:20:39AM -0700, Eric Blake wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> According to James Youngman on 12/7/2005 1:43 AM:
> > 
> > This means that I'm considering changing the output quoting method for
> > -ls and -print where the output goes to a tty.  Should I also consider
> > changing -ls and -fls to just print the literal pathname if the output
> > is going to a non-terminal?
> 
> I would argue for adding a --quoting-style option (or
> -quoting-style) to match ls, and allow the user to choose which
> output quoting style find uses, regardless of whether stdout is a
> tty or not.  When that flag is not present, I would make all
> filenames printed to a tty be quoted on the grounds that it is for
> human consumption, and all filenames printed to a non-terminal be
> literal on the grounds that the tool you are piping to should not
> have to unquote the name.

Looking at coreutils' ls.c, I notice that the substitution of ? for
"funny" characters and the quoting style are orthogonal, because the
quoting style will not (always) prevent control characters being sent
to the terminal.

Thus the control of the quoting style and the control of
?-substitution are separate.  It might make sense to do something
similar in findutils, but perhaps that's an unneccesary complexity.

James.





reply via email to

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