[Linux-disciples] Catching URLs on the command line
Stephen R Laniel
steve at laniels.org
Tue May 13 14:37:13 EDT 2008
On Sat, Jan 17, 2004 at 01:12:30PM -0500, Adam Kessel wrote:
> On Sat, Jan 17, 2004 at 12:12:55PM -0500, Stephen R Laniel wrote:
> > On Sat, Jan 17, 2004 at 12:03:30PM -0500, Adam Kessel wrote:
> > > The difference is subject and predicate. Or something. Perl and Unix are
> > > both content to have sensible defaults for the *object* of a command, but
> > > not for the command itself. E.g., many unix tools default to stdin as
> > > the object (e.g., grep), or have some other sensible default behavior if
> > > you just run the command. When you don't give Perl any variable to
> > > operate on, it operates on the default variable. But there is never a
> > > case in Perl or Unix that I'm aware of where you give it some variable
> > > and it guesses what action to take on it.
> > Here I am just thinking out loud, but: isn't it just as
> > dangerous, potentially, to allow default objects as it is to
> > allow default verbs? Both introduce some confusion into what
> > might be happening at a given moment in a given program, but good
> > programmers learn to work around it -- actually, not just work
> > around it, but use it to their advantage to write shorter code.
>
> I suspect it's more dangerous to have default executable code rather than
> default executable object, but you could probably argue either way.
http://dailyvim.blogspot.com/2008/05/zsh-alias-suffixing.html
--
Stephen R. Laniel
steve at laniels.org
+(617) 308-5571
http://laniels.org/
PGP key: http://laniels.org/slaniel.key
More information about the Linux-disciples
mailing list