NetBSD-Users archive

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

Re: sh shell emacs mode

Menuhin Saitov <> wrote:

> i am trying to set sh as default shell but i wanted history and the emacs 
> mode works only if i write an shell  but no starts automatically.

I don't understsand what you mean by "write on shell" but taking a guess
that you want command history and emacs command line editing mode for
all your interactive shells, here are a couple of suggestions:

a) quick try: add 'set -o emacs' to your .profile and see if that
   does what you want

b) (longer) I use /bin/ksh as my login shell, and have emacs mode
   and history working

   My configuration is probably overly complex -- it's arisen over many
   years and many different Unix and ksh flavours -- but it works.

   1. .profile sets ENV=$HOME/.kshrc and exports ENV

   2. .kshrc contains the line 'set -o emacs'

   There are various complications about trying to avoid work for
   non-interactive shells (some of this dates back 20 years to some slow
   machines), tweaking of the shell prompt, and some platform specific
   stuff, but I think that's all you need for NetBSD's ksh.

   NetBSD's /bin/ksh (a.k.a. "pdksh") does not store command history
   between sessions so far as I know.  If you need that, you might need
   to consider using bash.


Home | Main Index | Thread Index | Old Index