Subject: Re: command-line editing and "standard" shells.... (was: CVS commit: src)
To: NetBSD-current Discussion List <current-users@netbsd.org>
From: David Maxwell <david@fundy.ca>
List: current-users
Date: 03/18/1999 11:41:13
On Wed, Mar 17, 1999 at 10:56:58PM -0500, Greg A. Woods wrote:
> [ On Wednesday, March 17, 1999 at 18:20:56 (-0400), David Maxwell wrote: ]
> > Subject: Re: CVS commit: src
> >
> > But those features aren't enabled in the default config. Out of the box,
> > csh is more friendly.
> 
> I don't believe a word of that!  ;-)

What's your problem with the word 'in' ? ;-)

> The only "friendly" feature that NetBSD's csh has (and one that I don't
> normally associate with a plain old csh -- it was definitely news to me
> yesterday!) is filename (and user-name) completion.  I'd vote for adding
> it to sh (ksh already has filename completion, but I suppose it could
> use user-name completion), though I'm unlikely to do the S.M.O.P.
> necessary.

And as discussed in another reply to the thread, that's a reason to not
have it be the single-user shell.

> I think it's rather silly to try and claim that command-line editing
> isn't "enabled out of the box".  With pd-ksh (i.e. NetBSD's ksh) in

But no one has argued using ksh, just sh or csh. 

> It's down-right wrong to claim that sh or ksh command-line editing have
> any specific leaning towards emacs.  It's just as easy to say "set -o

What shell, as NetBSD is shipped now, can a user press (cursor-up) and
see their previous command? (and edit it) Despite the fact that I know
you're an Emacs person Greg, and I, vi, non-cursor keyed command recall
is non-intuitive, which is true for 'EscK' and '^A'

> > Perhaps we can redirect this discussion to decide which goals we are trying
> > to meet with the shipped shell, then figure out which one meets them best.
> 
> I think Jason hit the nail on the head w.r.t. this:  /bin/sh (or even
> now /bin/ksh) is a standards compliant shell -- this meets extremely
> well with the already well defined and seemingly well accepted goal that
> NetBSD be as "standards compliant" as is sanely possible for it to be.

This is the main arguement as I see it also. Shipping with the POSIX
shell by default seems quite sensible to me. That's really my last 
thought on the issue, remainder of message for completeness only.

> > Isn't cursor-up for previous command more intuitive than ^A ?
> 
> And that's exactly the way /bin/sh works.  It's also why I've had the
> magic cursor-key aliases in my ~/.kshrc for nearly a decade now (real
> ksh doesn't normally automatically interpret cursor keys).

It doesn't work that way out of the box though, you needed to find the
'magic cursor-key aliases' and set them up.

> > sh is the most basic shell on the system (rc is a package.) and it seems
> > best suited for maintainence. I really don't want someone executing history
> > recall commands in single user mode.
> 
> I sure do!  I think it means power users will be far less likely to make
> silly mistakes.

It's a lot harder to type a whole line wrong, character by character, than
to do a recall (visual or not) and hit enter at a bad moment.

> > Hmm, I disklabeled the disk, and restored
> 
> That's a problem with csh-style history, not with proper command-line
> editing where you always get to see what you'll execute before you hit
> return.

In my example yes. I still believe my comment above though.

> > btw, why are we arguing about root's shell when the default install says
> > "Don't login as root, use su!"
> 
> I've definitely no argument against that!  ;-)

Noted on the calendar, Greg! ;-)

-- 
David Maxwell, david@vex.net|david@maxwell.net --> Mastery of UNIX, like
mastery of language, offers real freedom. The price of freedom is always dear,
but there's no substitute. Personally, I'd rather pay for my freedom than live
in a bitmapped, pop-up-happy dungeon like NT. - Thomas Scoville