Subject: Re: command-line editing and "standard" shells....
To: NetBSD-current Discussion List <current-users@netbsd.org>
From: After 5 PM please slip brain through slot in door. <greywolf@starwolf.com>
List: current-users
Date: 03/19/1999 16:37:37
Greg A. Woods sez:
/*
 * [ On Friday, March 19, 1999 at 09:38:07 (-0800), [This is my bacque pas, this is my faux pas] wrote: ]
 * > Subject: Re: command-line editing and "standard" shells....
 * >
 * > What's the chances we could officially hack the shell to handle
 * > - not requiring "fg" before "%job"
 * 
 * I'm not sure this is a good idea -- it kinda violates the command
 * syntax.

Then the command syntax is broken as designed.  The resultant six-plus
keystrokes required (the "wrong way" followed by " the right way")
plus the resultant error message are just not worth the grief.  Call
it trivial if you will, but things that error at me for doing something
I consider to be reasonably normal tend to drive me away.

 * > - handling {} expansion
 * 
 * already done in PD-KSH:

Yeah, noted, been there for at least eight years now.

 * > - allowing shell functions which are not limited to [A-Za-z0-9_-]
 * 
 * Hmmmm????  Like?  Why?

I have several aliases beginning with punctuation.  I've been known to
wander on to a command line after a horrendously long vi session
and type
	:e file
for example.  Laziness, yeah, and I could do it in a shell script, but
why can't I do it in a function?

 * (I think this is relatively difficult to do without going back to a
 * hand-crafted parser too.  It might break POSIX compatability too.)

If POSIX is gonna be so anal as to dictate what you can name your
functions, then fsck POSIX for all I care, at least on that issue.
I notice that ksh makes a mockery of aliases, and I believe that
was not coincidental to csh's (ab)use of aliases in place of shell
functions.

 * 
 * > - doing something similar to a .cshrc at time of "su"
 * 
 * It already works!  Just put these in your ~/.profile:
 * 
 * export ENVFILE=~/.kshrc
 * export ENV='${ENVFILE[(_$-=1)+(_=0)-(_$-!=_${-%%*i*})]}'

And that pattern-match substitution sh*t is just nuts.  I still want to
shoot our last ksh scripter.

Most importantly, I'd like to see these concepts implemented in
our shell, or bash, or something.  Ksh leaves this really nasty
taste in my mouth like the smell one is bestowed when visiting
a flatulent elephant, but only because my experiences with ksh
have been less than pleasant.

To give equal time, I will berate csh for:
- its inability to deal with blocked code on the command line
- its inability to suspend in the middle of a foreach
- its horrible interrupt handling / signal trapping (SIGTSTP gets caught as
	an interrupt!)
- its woefully inadequate I/O redirection

but in all other respects, IMNSHO, I consider csh to be a more
friendly shell.

If anyone wishes to engage in a shell war off line, feel free to
send me mail.  I've made my points and I'm going to shut up about
this now.  Sorry for the noise.

 */





				--*greywolf;
--
"I am Buzz Lightyear, ->SPACE RANGER<-"
"You are a TOY!  T-O-Y: TOY!"