Subject: Re: ksh and tab completion
To: None <wojtek@wojtek.from.pl>
From: Greg A. Woods <woods@weird.com>
List: netbsd-users
Date: 03/21/2001 13:44:47
[ On Wednesday, March 21, 2001 at 12:59:26 (+0100), wojtek@wojtek.from.pl wrote: ]
> Subject: Re: ksh and tab completion
>
> > (Un)Fortunately /bin/ksh also smaller and perhaps faster than /bin/sh:
> > 
> > i386 $ size /bin/sh /bin/ksh
> > text    data    bss     dec     hex     filename
> > 395707  9112    19964   424783  67b4f   /bin/sh
> > 373739  3776    23356   400871  61de7   /bin/ksh
> > 
> > sparc $ size /bin/sh /bin/ksh
> > text    data    bss     dec     hex     filename
> > 473736  9100    19192   502028  7a90c   /bin/sh
> > 446112  3804    22508   472424  73568   /bin/ksh
> 
> -r-xr-xr-x  1 root  wheel  156004 Mar 18 10:47 /bin/ksh
> -r-xr-xr-x  1 root  wheel   86680 Mar 18 10:47 /bin/sh
>
> relinked dynamically (i386) 

There I go trying to demonstrate the proper way to get beyond the first
step in profiling memory use on Unix, and back you go to using "ls"!  :-)

(Now if your binaries are stripped, and not using -g, then their
relative sizes may give some indication as to just how much additional
text space would be saved by not including command-line editing,
history, and the like, in /bin/sh.)

> yes. sh is IMHO not much usable as interactive shell but it's good in
> scripts. 

Hold on a minute there....

The NetBSD /bin/sh is almost completely as functional for interactive
use as bash or any ksh (or tcsh, for that matter).  Just where do you
get the idea that it's not usable as an interactive shell!?!?!?!?!?

There's full history, command-line editing with two major editing
"modes", aliases, etc., etc., etc.  What more could you possibly even
dream of asking for (and that's also already in ksh, bash, or tcsh)?!?!?

Maybe it doesn't have tab completion, but now that I've mentioned it I'm
sure some keener hacker is half-way through adding changes to it that'll
only add about 5kb more text to it!  :-)


FURTHERMORE, proper Bourne Shell is actually far less useful as a proper
programming language than is Korn Shell!  POSIX partly fixes that by
adding a few ksh features (such as arithmetic expansion, but
unfortunately not arrays).

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods@acm.org>      <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>