1 |
On Mon, Mar 23, 2009 at 8:41 AM, Ulrich Mueller <ulm@g.o> wrote: |
2 |
>>>>>> On Mon, 23 Mar 2009, Ciaran McCreesh wrote: |
3 |
> |
4 |
>>> Now that "dosed" is going to be banned, what would people think of |
5 |
>>> "newins" (and the other "new*" commands) accepting "-" as the first |
6 |
>>> argument? |
7 |
> |
8 |
>> There's a slightly different variation in exheres-0: as well as do* |
9 |
>> and new*, there's also here*, which you use like this: |
10 |
> |
11 |
>> hereins foo <<'END' |
12 |
>> stuff |
13 |
>> END |
14 |
> |
15 |
> Why would we need a new command for this? The minus sign denoting |
16 |
> standard input is fairly common with other utilities. |
17 |
> |
18 |
>> It magically barfs, rather than hanging indefinitely, if you forget |
19 |
>> to give it some input. |
20 |
> |
21 |
> I guess the same could be done for "newins -", if you think that it is |
22 |
> necessary (test for stdin being a terminal?). But I don't really see |
23 |
> the point of it, since such a mistake would be noticed immediately |
24 |
> when testing the ebuild. |
25 |
|
26 |
No, they aren't 'noticed immediately'. The ebuild hangs and then the |
27 |
author spends 10 minutes trying to figure out why. If its trivial to |
28 |
implement..I don't see a downside to such a feature. |
29 |
|
30 |
> |
31 |
>> The rationale for giving it a new name rather than overloading an |
32 |
>> existing one is that some of the existing do* utilities don't take |
33 |
>> just a single simple filename, so overloading would make the command |
34 |
>> line somewhat convoluted. |
35 |
> |
36 |
> It doesn't make much sense to specify "-" as an argument for "do*", |
37 |
> because the command would not know under which name the file should be |
38 |
> installed. OTOH, all "new*" commands have exactly two arguments, so we |
39 |
> could allow "-" for the first argument. |
40 |
> |
41 |
> Ulrich |
42 |
> |
43 |
> |