Subject: Re: Tab completion in /bin/sh
To: Greg A. Woods <>
From: Arto Huusko <>
List: current-users
Date: 05/05/2005 23:37:13
Greg A. Woods wrote:
> [ On Tuesday, May 3, 2005 at 17:38:50 (-0500), Richard Rauch wrote: ]
>>Subject: Re: Tab completion in /bin/sh
>>As for removing /bin/ksh altogether: Well, I've been toying with
>>the idea of setting my default shell to /bin/sh...
> Before you do that you might want to consider that (pd)ksh is smaller
> (at least on some platforms, like this alpha):
> 	$ size /bin/*sh
> 	text    data    bss     dec     hex     filename
> 	420304  22400   24212   466916  71fe4   /bin/ksh
> 	457546  17976   21604   497126  795e6   /bin/sh
> (that's from 1.6.x, btw, and of course they're both static-linked)

But the situation looks a bit different on dynamically linked 2.99.10

% size /bin/*sh
    text    data     bss     dec     hex filename
  169296    9174   20776  199246   30a4e /bin/csh
  250113    7956    7096  265165   40bcd /bin/ksh
  166398    5049    8496  179943   2bee7 /bin/sh

The proportianl difference is about the same on 3.99.3 i386.
ksh is 1.5x bigger.

>>But, getting back to /bin/ksh: How can you get arbitrary commands
>>to run in your prompt in /bin/sh?
> Probably, but you shouldn't -- there are better ways to get useful
> information about your current session status.  :-)

Well, if someone wants to see it all, all the time, in the prompt,
and has been doing that for a decade, I'm sure they are in the
best position to decide for themselves what their prompt should say.

> (and keep in mind that arbitrary length prompts screw up command-line
> editing somewhat too)

But if you are crazy enough (and perhaps a bit shell-ignorant? like me),
you can work around this by running a nasty formatting function (which
calls things like wc(1) and cut(1)) in PS1.