[comp.sys.amiga] suggestion for next release of shell

pds@quintus.UUCP (Peter Schachte) (04/30/88)

I had an idea for a future version of Matt/Steve's shell.  If the first
character typed on the command line is a !, and the second is not a !
or a number, immediately search back for the first line that begins
with that second character and replace the type-in with it, just as the
up and down arrows do.  Then if the next character typed is not the
same as the next character in the current type-in line, then search back
for the first line that matches both, and so on.  This is an
emacs-style incremental search backwards.  If the user types delete,
you would have to go back to the previous state.  Return would execute
the command.  Typing a character that doesn't match anything in the
history should probably just beep at you or something, and not accept
the character.

The beauty of this is that the keystrokes typed to reexecute a command
would be the same as for csh, but this would be strictly more powerful,
since you immediately know when you've found the command you want to
redo.  Also, you could edit the command.  This would be MUCH easier
than using csh's !xxx:s/old/new/ form, or even the ^old^new form.
-- 
-Peter Schachte
pds@quintus.uucp
...!sun!quintus!pds

mb@munnari.oz (Michael Bednarek) (05/02/88)

In article <914@sandino.quintus.UUCP> pds@quintus.UUCP (Peter Schachte) writes:
>I had an idea for a future version of Matt/Steve's shell.  If the first
>character typed [...]

... which reminds me of a very strange undocumented feature in shell
which I haven't seen discussed: If the first character typed on the
command line is a numeric that lines gets eaten, as if it were a comment.

As this is done quite deliberately (look at the source), this cannot be
called a bug. But why? What's wrong with a program "1off"?

dillon@CORY.BERKELEY.EDU (Matt Dillon) (05/07/88)

:.... which reminds me of a very strange undocumented feature in shell
:which I haven't seen discussed: If the first character typed on the
:command line is a numeric that lines gets eaten, as if it were a comment.
:
:As this is done quite deliberately (look at the source), this cannot be
:called a bug. But why? What's wrong with a program "1off"?

	It is a well-known bug.  The command interpreter ignores numbers
as command names (or commands starting with a number) due to the way it
handles error conditions.  I know I should fix it ...   See the 
description of COMMANDS and the _except variable for more info.

					-Matt