NetBSD-Desktop archive

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

Re: Tasks



On 02/14 09:25, Andrew Doran wrote:
> On Sat, Feb 14, 2009 at 09:08:52AM +0200, Alan Barrett wrote:
> 
> > The default /root/.profile sets ENV=/root/.shrc, and the default
> > /etc/skel/.profile sets ENV=$HOME/.shrc.  Then both /root/.shrc and
> > /etc/skel/.shrc turn on emacs line editing and tab completion.  This
> > should be all we need, in terms of configuration, for sh and ksh to
> > behave "like bash" on a fresh installation.
> 
> Wow, I am years out of date. So we *do* set -o emacs by default now.
> 
> > There is one thing missing in sh's implementation of tab
> > completion: when you want to complete a command name, it instead
> > attempts to complete a file name.
> 
> This works for me with ksh and the following:
> 
> if [ "x${KSH_VERSION}" != "x" ]; then
>         bind '^I'=complete-list 2>/dev/null
> fi
> 
> I will add it to shrc.
> 
> > If that were fixed, and if it grew a "set -o braceexpand" option, then I
> > would personally have no need for bash.  (At least, I am not aware of any
> > other bash features that I rely on and that are missing in /bin/sh.)
> 
> According to the manual page ksh has this.

One thing it doesn't have is a sane multi-line editing mode,
unfortunately.  If your current line grows beyond the width of the screen,
ksh truncates the line.  I don't know about the rest of the world, but I
find that quite annoying.  Sure, you can look back and see the rest of the
line, but I like being able to look at everything at once.  /bin/sh
behaves as expected (remember, trying to act like bash) and simply
continues the line on the following row.  It looks like other ksh versions
have a 'multiline' option to control this.


Home | Main Index | Thread Index | Old Index