[comp.sys.amiga] Democracy in Action

mwm@eris.BERKELEY.EDU (Mike (Don't have strength to leave) Meyer) (12/17/86)

In article <1696@vax135.UUCP> cjp@vax135.UUCP (Charles Poirier) writes:
>While I'm at it, let me add my vote in favor of uniform filename
>expansion at the CLI level.

Marvelous. Let's vote in favor of something you don't understand! To wit:

>By the way, this should be tweaked in a way that UNIX screws up: for
>output-redirection, i.e. cmd >foo#?.  ALLOW globbing IF the expansion
>results in ONE file name (error otherwise).

Sorry, but you *CAN* get Unix to do exactly that. You have to remember
that it's mindlessly expanding arguments into file names, so you have
to make the output (or input) file a separate word, as "cmd > foo*".
Works like a charm. It even returns the error "ambiguous" when there's
more than one file.

The thing that annoys me most about all this is that much of the
discussion - including mine - is based on assumptions that are correct
for a 9600 baud or slower terminal tied to a serial line, but wrong
for the Amiga. I've been designing a shell that ignores those (and
shows a change in my position).

I'll post something ASAP for the world to comment on, but I'm under
time pressure to get 4.3BSD ported to our 8800. It's hard to do
anything as long as a shell design during kernel compiles :-).

	<mike

cjp@vax135.UUCP (Charles Poirier) (12/19/86)

In article <1966@jade.BERKELEY.EDU> mwm@eris.BERKELEY.EDU (Mike (Don't have strength to leave) Meyer) writes:
>In article <1696@vax135.UUCP> cjp@vax135.UUCP (Charles Poirier) writes:
>>While I'm at it, let me add my vote in favor of uniform filename
>>expansion at the CLI level.
>
>Marvelous. Let's vote in favor of something you don't understand! To wit:
>
>>By the way, this should be tweaked in a way that UNIX screws up: for
>>output-redirection, i.e. cmd >foo#?.  ALLOW globbing IF the expansion
>>results in ONE file name (error otherwise).
>
>Sorry, but you *CAN* get Unix to do exactly that. You have to remember
>that it's mindlessly expanding arguments into file names, so you have
>to make the output (or input) file a separate word, as "cmd > foo*".
>Works like a charm. It even returns the error "ambiguous" when there's
>more than one file.

Marvelous yourself.  Bourne shell and ksh don't allow it.  Invalidate
**MY** vote, will you?!  Sorry for aggravating all you csh types for
whom I failed to realize this is no problem.

>The thing that annoys me most about all this is that much of the
>discussion - including mine - is based on assumptions that are correct
>for a 9600 baud or slower terminal tied to a serial line, but wrong
>for the Amiga.

Care to clarify?  Sounds like you're saying (excuse my presumption here)
that the desirability of filename expansion has something to do with the
speed of the channel from CPU to screen?  I don't get it.

To me, one of the relevant assumptions is directory search speed.  If
Amiga had a fast directory listing, filename expansion would be lots
better than with the present grind, grind, grind search.
Though it's still worthwhile.

	Charles Poirier   (USENET)!vax135!cjp

mwm@eris.BERKELEY.EDU (Mike (Don't have strength to leave) Meyer) (12/27/86)

In article <1702@vax135.UUCP> cjp@vax135.UUCP (Charles Poirier) writes:
>In article <1966@jade.BERKELEY.EDU> mwm@eris.BERKELEY.EDU (Mike (Don't have strength to leave) Meyer) writes:
>>In article <1696@vax135.UUCP> cjp@vax135.UUCP (Charles Poirier) writes:
>Marvelous yourself.  Bourne shell and ksh don't allow it.  Invalidate
>**MY** vote, will you?!  Sorry for aggravating all you csh types for
>whom I failed to realize this is no problem.

You're quite right - bourne shell (my ksh is old and ailing, so wasn't
tested :-) works as you describe. Worse yet, csh is bright enough to
glob ">*.c" correctly, even without the space. Apologies to all.

>>The thing that annoys me most about all this is that much of the
>>discussion - including mine - is based on assumptions that are correct
>>for a 9600 baud or slower terminal tied to a serial line, but wrong
>>for the Amiga.
>
>Care to clarify?  Sounds like you're saying (excuse my presumption here)
>that the desirability of filename expansion has something to do with the
>speed of the channel from CPU to screen?  I don't get it.

Sure. I've been bouncing some ideas for a new shell around (it'll do
the filename expansion - but only so the user can control it! I'll
still have my per-argument globbing), and will post the thoughts on it
when I have time (1988?).

The idea is that globbing is a great thing, in that it saves lots of
typing. But we've now got LOTS of bandwidth, so we can do better. For
instance, I type an argument, possibly incomplete, possible with
patterns in it. Not sure what to do next, so I hit the HELP key (for
example only - other keys may apply here!). The shell then pattern
matches what I've typed against the correct universe to generate a
list of names. It opens a requestor with all the names displayed, plus
an "OK" gadget. I select the files I want with the mouse (or via other
technics; something like the Dpaint II stencil requester comes to
mind...), then hit OK. The shell subs in all my selections, and we go
on to the next argument.

Likewise, the history mechanism could be run through the shell (I've
actually seen a demo of this!).

In summary, it's not the question of pattern matching, or filename
expansion, or whatever. It's the design philosophy of the shell.
[Not to insult CBM/Amiga, but the Workbench is *NOT* a shell. It's
something else again....]

	<mike

cjp@vax135.UUCP (12/30/86)

In article <2062@jade.BERKELEY.EDU> mwm@eris.BERKELEY.EDU (Mike (Don't have strength to leave) Meyer) writes:
>Sure. I've been bouncing some ideas for a new shell around (it'll do
>the filename expansion - but only so the user can control it!
...
>instance, I type an argument, possibly incomplete, possible with
>patterns in it. Not sure what to do next, so I hit the HELP key (for
>example only - other keys may apply here!). The shell then pattern
>matches what I've typed against the correct universe to generate a
>list of names. It opens a requestor with all the names displayed, plus
>an "OK" gadget. I select the files I want with the mouse (or via other
>technics; something like the Dpaint II stencil requester comes to
>mind...), then hit OK. The shell subs in all my selections, and we go
>on to the next argument.

I like the idea of feedback and confirmation of the expansion.  I'd
prefer something besides a requester.  How about expanding the glob
right into the command line, which could then be edited a' la ksh?  Or
for mouser types, make the expanded command line mouse-sensitive per
word, say maybe click to delete?  Also -- for those times when the
globbing turned out really wrong, you might want an "unglob" key to
give you back the unexpanded form.  Then you edit the glob and
re-expand.

I use globbing for completion as much as for multiple filenames, for
the sake of speed.  Having to switch from keyboard to mouse and back to
handle a requester is a minus.

A related point -- the "expand" option should be a character that you
can put into a text file, so that globbing is available from inside
shell scripts.  (I don't know whether HELP is mapped into ascii --
probably not.)

>Likewise, the history mechanism could be run through the shell (I've
>actually seen a demo of this!).

Not sure what you mean here.  Are you familiar with history under ksh?

>In summary, it's not the question of pattern matching, or filename
>expansion, or whatever. It's the design philosophy of the shell.
>[Not to insult CBM/Amiga, but the Workbench is *NOT* a shell. It's
>something else again....]
>
>	<mike

From the way the CLI is hidden, tucked away in system directory, not
Workbench top level, and not even made visible unless the user runs
Preferences ... you'd think that CBM/Amiga's "design philosophy" was
that they don't WANT people to use it.  Yes I know about using
s:startup-sequence for getting a fast CLI, but I found this out on
USENET; it's not emphasized in the users' manuals.  Sure you want to
"ease in" naive users, but come on, there *are* some computer literate
people who are ready to type at their brand new (or freshly booted)
Amiga.

	Charles Poirier   (USENET)!vax135!cjp