NetBSD-Users archive

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

Re: sh shell emacs mode



On Sat, 13 Jun 2009, Giles Lean wrote:

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:
I mean that i have open xterm.

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

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.

Giles

It is similar to sh,
but it doesnt work i put it in .shrc and ENV is .shrc on ksh it works but sh not.

Menuhin

http://www.msaitov.de/pgp.htm




Home | Main Index | Thread Index | Old Index