🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #14145

Re: SKsh completion bug.

#14145
From: Mike (Real Amiga have keyboard g...
Date: Fri, 09 Mar 1990 21:21
50 lines
3040 bytes
<Warning - religious comments follow>

In article <5367@sugar.hackercorp.com> peter@sugar.hackercorp.com (Peter da Silva) writes:

   > The only reason I can see for doing shell expansions is to provide a
   > unix-like environment, which means you also need a bunch of unix-like
   > commands that expect the wildcards to be expanded.

   It also ensures that (a) you can be guaranteed that all programs will
   accept wildcards, (b) that all programs will use wildcards uniformly,
   and (c) that you can defeat the wildcarding easily and in a uniform manner.

Or:

a) you can be guaranteed that programs that don't take file names as
arguments will do oddball things if when given characters that aren't
magic in that context; b) that programs that want to do pattern
matching against anything other than files will regularly require
magic cookies; c) that scripts running programs that pattern match
will require levels of quoting that may depend on other apparently
unrelated arguments.

Quick: how do you get a ".*" to a sed being run from a shell script
run via 'system' from the program you're actually invoking?

Peter is arguing for consistency to the point that it starts
becoming painfull. By providing a system library with calls to do
pattern matching on a single argument or an argument list, you can
have the same kind of consistency. Better yet, you can have commands
that treat string arguments as strings, and not as file names that
have to be treated magically in some cases. Even better, you can
provide for matching in spaces other than the file space (running
processes, machines on the network, and probably others). Similar
comments can be made regarding providing file name completion.

BTW, the "unix-like commands" don't need to expect anything to be
wild-carded. They'll run quite happily in any environment. All they
need to be usefull in such an environment is to expect multiple
filenames as arguments.  I've got a hacked C startup module that does
AmigaDOS style pattern matching before calling the main routine.  It
gets linked in with programs that expect multiple file names, but not
with programs that expect a fixed number (like zero) of arguments
filename arguments.

	<mike
--
The sun is shining slowly.				Mike Meyer
The birds are flying so low.				mwm@relay.pa.dec.com
Honey, you're my one and only.				decwrl!mwm
So pay me what you owe me.
Technical Details
Message-ID: <MWM.90Mar9132152@raven.pa.dec.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!usc!elroy.jpl.nasa.gov!decwrl!granite.pa.dec.com!mwm
References: <8289@wpi.wpi.edu> <13920055@hpfelg.HP.COM> <392@icebox.nsc.com> <5367@sugar.hackercorp.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!usc!elroy.jpl.nasa.gov!decwrl!granite.pa.dec.com!mwm
From: mwm@raven.pa.dec.com (Mike (Real Amiga have keyboard garages) Meyer)
Newsgroups: comp.sys.amiga.tech
Subject: Re: SKsh completion bug.
Message-ID: <MWM.90Mar9132152@raven.pa.dec.com>
Date: 9 Mar 90 21:21:52 GMT
References: <8289@wpi.wpi.edu> <13920055@hpfelg.HP.COM> <392@icebox.nsc.com>
 <5367@sugar.hackercorp.com>
Sender: news@decwrl.dec.com
Organization: Missionaria Phonibalonica
Lines: 50
In-reply-to: peter@sugar.hackercorp.com's message of 9 Mar 90 19:07:57 GMT