Subject: Re: pkg/16226 (new patch for review)
To: None <tech-userlevel@netbsd.org>
From: Christopher Richards <richards+netbsd@CS.Princeton.EDU>
List: tech-userlevel
Date: 01/18/2003 14:23:11
On 18 Jan 2003 19:13:20 GMT, Julio Merino wrote:

> On 18 Jan 2003 13:46:14 -0500
> Christopher Richards <richards+netbsd@CS.Princeton.EDU> wrote:
> 
> [...]
> > cd_prompt () {
> > [...]
> > }
> > 
> > alias cd='cd_prompt'
> 
> Do you expect newcomers to know to write all this stuff? linux'ers will
> know how bash works and will try that. Just to say that implementing it
> inside sh will be faster than calling a shell-script function.

I was criticizing the implementation decision: don't add junk to the C
code when the scripting language is sufficient.  I expect the
implementor of the fancy-prompt feature to "write all this stuff", not
each newcomer who wants a fancy prompt.  For example: put cd_prompt()
into a system-wide /etc/skel/.shrc.

As for speed, the cd_prompt() function I mentioned takes great care to
use only builtin commands, so the speed difference should be
negligible.

Lastly, I suspect that linux users who know how bash works will miss
more bashisms than just prompt expansion -- but that's not an argument
to make our /bin/sh a bash clone.

-- 
Chris