gnu-arch-users
[Top][All Lists]
Advanced

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

Re: [Gnu-arch-users] Pipes?


From: Pierce T . Wetter III
Subject: Re: [Gnu-arch-users] Pipes?
Date: Wed, 17 Mar 2004 16:42:54 -0700


However, the "where does unescaping take place" question -- my general
principles analysis is still right.

Yeah, I kind of agreed with that, and I think it was the right answer for this
case. But we're talking about pipes now. :-)


There's a choice about how to make xargs work.   One idea is that
xargs could itself do unescaping. It's going to pass arguments in an
argv so there would be no ambiguity resulting from unescaped
filenames.

Thing is, xargs can do some unescaping already. It converts \\ to \ for
instance. It just seems to be doing different unescaping then the
pika escaping...

Right.  Pika escaping is new and nothing outside of hackerlab and tla
(where it isn't even merged yet) supports it.   But none of the extant
and more widely deployed alternatives really do as well.   So, it's a
good thing to start promoting.

I don't really like the Pika escaping, but I was choosing my battles...

Its a bit problematic how it works, because it looks like all the C-like escaping methods already in existence so its pretty much guaranteed to conflict with every
OTHER unix tool...

So frankly, I'm underwhelmed by the Pika escaping, and I'm not sure what problem it solved that "\" wasn't. But its not like I read the spec for how pika escaping works either.

So I'm not fighting that battle, since someone else did a lot of work to get pika escaping working. I'm trying to fight a pipe battle instead, so I can use tla add without writing a while loop or more likely a Python program. :-)



The other idea is that all arch commands should unescape their command
line arguments which are filenames.

Subcommand expansion (backticks and $(...)) complicates things.


  Actually, I was thinking it might be a global option. Early on in
main(), it would
look for a --pipe option, and if it found one, append stdin to argv
before doing anything else.

Nah.  You want --list or --file for arguments of a particular type.

 I'd understand that better with an example of each.

What about a program that needs to read _two_ lists of arguments, for
example?

 How would you do that on the command line?

 Pierce





reply via email to

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