Subject: Re: How to bind keys in .kshrc
To: <>
From: David Laight <david@l8s.co.uk>
List: netbsd-users
Date: 10/01/2003 09:46:38
On Tue, Sep 30, 2003 at 07:50:00PM +0200, Julien Gabel wrote:
> > The manpage for ksh(1) doesn't even mention $HOME/.kshrc. Isn't that
> > a bug? If I used ksh, I'd like to know whether it's used for any shell
> > or only a login shell and whether it's processed before or after
> > $HOME/.profile etc.
> 
> ${HOME}/.kshrc is normally sourced if the ${ENV} variable is exported, for
> example in the ${HOME}/.profile :
> 
>   ENV=${HOME}/.kshrc ; export ENV
> 
> This environmental script is read (sourced) each time a new sub-Korn Shell
> process is launched : the login process is one of them. ${HOME}/.kshrc is
> sourced *after* the ${HOME}/.profile in the login phase.

Ugggg - no wonder you have problems!
ENV is used by many shells, so you can't have ksh commands in it
(unless you detect the shell is ksh, [ "$RANDOM" != "$RANDOM" ] is a check
that will exclude sh)

	David

-- 
David Laight: david@l8s.co.uk