Gentoo Logo
Gentoo Spaceship

Installation:
Gentoo Handbook
Installation Docs

Documentation:
Home
Listing
About Gentoo
Philosophy
Social Contract

Resources:
Bug Tracker
Developer List
Discussion Forums
Gentoo BitTorrents
Gentoo Linux Enhancement Proposals
IRC Channels
Mailing Lists
Mirrors
Name and Logo Guidelines
Online Package Database
Security Announcements
Staffing Needs
Supporting Vendors
View our CVS

Graphics:
Logos and themes
Icons
ScreenShots

Miscellaneous Resources:
Gentoo Linux Store
Gentoo-hosted projects
IBM dW/Intel article archive




List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Mike Frysinger <vapier@g.o>
Subject: Re: newins "-" for standard input?
Date: Wed, 25 Mar 2009 21:07:23 -0400
On Monday 23 March 2009 13:01:46 Alec Warner wrote:
> On Mon, Mar 23, 2009 at 8:41 AM, Ulrich Mueller <ulm@g.o> wrote:
> >>>>>> 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.
>
> No, they aren't 'noticed immediately'.  The ebuild hangs and then the
> author spends 10 minutes trying to figure out why.  If its trivial to
> implement..I don't see a downside to such a feature.

this "feature" can be found in any number of existing utilities.  like sed.  
any argument along those lines is pretty weak.  using "-" as a shortcut name 
for stdin sounds logical to me considering it's a standard in the *nix world.

as for the portage utils checking stdin and reporting an error if it's trying 
to grab from the terminal, that's cheese someone can implement if they really 
want it.
-mike
Attachment:
signature.asc (This is a digitally signed message part.)
References:
newins "-" for standard input?
-- Ulrich Mueller
Re: newins "-" for standard input?
-- Ulrich Mueller
Re: newins "-" for standard input?
-- Alec Warner
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: newins "-" for standard input?
Next by thread:
Re: newins "-" for standard input?
Previous by date:
Re: Gentoo Council Reminder for March 26
Next by date:
Re: Gentoo Council Reminder for March 26


Updated Jun 17, 2009

Donate to support our development efforts.

Gentoo Centric Hosting: vr.org

VR Hosted

Tek Alchemy

Tek Alchemy

SevenL.net

SevenL.net

php|architect

php|architect

Copyright 2001-2007 Gentoo Foundation, Inc. Questions, Comments? Email www@gentoo.org.