>>>>> On Mon, 23 Mar 2009, Ciaran McCreesh wrote:

>> Now that "dosed" is going to be banned, what would people think of
>> "newins" (and the other "new*" commands) accepting "-" as the first
>> argument?

> There's a slightly different variation in exheres-0: as well as do*
> and new*, there's also here*, which you use like this:

>     hereins foo <<'END'
> stuff
> END

Why would we need a new command for this? The minus sign denoting
standard input is fairly common with other utilities.

> It magically barfs, rather than hanging indefinitely, if you forget
> to give it some input.

I guess the same could be done for "newins -", if you think that it is
necessary (test for stdin being a terminal?). But I don't really see
the point of it, since such a mistake would be noticed immediately
when testing the ebuild.

> The rationale for giving it a new name rather than overloading an
> existing one is that some of the existing do* utilities don't take
> just a single simple filename, so overloading would make the command
> line somewhat convoluted.

It doesn't make much sense to specify "-" as an argument for "do*",
because the command would not know under which name the file should be
installed. OTOH, all "new*" commands have exactly two arguments, so we
could allow "-" for the first argument.

Ulrich

Reply via email to