NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: /bin/sh for interactive use?

My requirements are only simple interactive features:
Cursor left / right,
simple command recall (just go back in the buffer),
and simple filename completion,
because filenames  are becoming long and complicated.
I never use any other editing;
typing with ten fingers does not benefit from line editing.

But if filename completion it is provided,
it should do it fully useable, i.e. with proper quoting.

This does not mean complex and general command completion
and context dependent filename completion (i.e. complete
to zip if the command is unzip) etc.

Thus, I would vote to "repair" filename completion
and not to extend the shell further; even would not cry
if other interactive features are removed.

Just some numbers, even if you can retrieve them yourself easily:
On (not current) Debian Linux, /bin/bash is heave with about 700kB,
while /bin/dash has only 80kB.
So I tend to use scripts there with #!/bin/dash,
even if bash will be often in the cache.

On my fresh NetBSD 5.1RC2, /bin/sh has 140kB, which,
although 50% more than dash, is fairly tolerable
for many systems, I think.

If someone needs a comfortable shell, I would point at 'bash'
instead of ksh, because it should contain most features wanted
(can select vi or emacs editing).

Rainer Glaschick

Ian D. Leroux wrote:
> I note with surprise that NetBSD's /bin/sh has grown interactive
> features.  In particular, thanks to ~/.editrc, /bin/sh lets me have my
> own tweaked mappings while in vi emulation mode, which makes it more
> comfortable for me than /bin/ksh (whose user-definable keybindings only
> work for emacs emulation as far as I can tell from the manpage).  On the
> other hand, /bin/sh still has definite limits as an interactive shell
> (doesn't expand $PS1, doesn't quote filenames when tab-completing ...),
> and given its role as the standard script interpreter perhaps it should
> be kept as small as possible for embedded systems' sake.  I'm wondering
> what direction NetBSD is taking w.r.t interactive shells:
> - work on making /bin/sh comfortable? (while keeping it reasonably
>   small)
> - keep /bin/sh for scripts, improve /bin/ksh if necessary? (I wonder if
>   you could make it use editline)
> - ksh's behaviour is set in stone, users who want something different
>   from their interactive shell should get one from pkgsrc?
> On a related note, what's the status of utf-8 support in the base
> system shells?
> Ian Leroux

Home | Main Index | Thread Index | Old Index