Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!umd5!mimsy!chris
From: chris@mimsy.UUCP (Chris Torek)
Newsgroups: comp.unix.wizards
Subject: Re: globbing in the shell (Was Re: more rm insanity)
Message-ID: <9610@mimsy.UUCP>
Date: Thu, 3-Dec-87 20:48:32 EST
Article-I.D.: mimsy.9610
Posted: Thu Dec  3 20:48:32 1987
Date-Received: Tue, 8-Dec-87 02:51:13 EST
References: <1257@boulder.Colorado.EDU> <6840002@hpcllmv.HP.COM> <9555@mimsy.UUCP> <890@russell.STANFORD.EDU>
Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742
Lines: 21

One suggestion I have heard, which makes some sense to me, would
be to have the shell provide an environment variable giving the
exact command line used to invoke any particular command:

	Yes master? rm a.out core *.o *.s *	.i
					   -----
					oops, a tab!

would run `rm' with

	"CMDLINE=rm a.out core *.o *.s *\t.i"

in its environment.  Programs that deem themselves potential
troublemakers (rm) could then look at the original command line.
Programs that wanted special globbing (grep) could do their own
command line parsing, assuming that `glob' was provided as a separate
program or a library routine.  Programs that do not care (all the
rest) would ignore $CMDLINE.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690)
Domain:	chris@mimsy.umd.edu	Path:	uunet!mimsy!chris