Subject: Re: CVS commit: basesrc/bin/ksh
To: Roland Dowdeswell <elric@imrryr.org>
From: Frederick Bruckman <fredb@immanent.net>
List: tech-userlevel
Date: 09/28/2002 09:53:58
On Sat, 28 Sep 2002, Roland Dowdeswell wrote:

> There really aren't all that many ksh-specific things that you
> generally want to do in your startup scripts, are there?  The only
> thing that I do is set -o vi-tabcomplete and that is pdksh-specific
> not just ksh-specific.  And for that I just do a feature-set test
> rather than a shell test:
>
> case $- in *i*)
> 	set -o vi
> 	if set -o | grep vi-tabcomplete >/dev/null 2>&1; then
> 		set -o vi-tabcomplete
> 	fi
> esac

FPATH and autoload, and persistent history. This is what I use:

if [ $0 = ksh -o $0 = -ksh -o $0 = /bin/ksh ]; then
  FPATH="${HOME}/functions"
  HISTFILE="${HOME}/.ksh_history"
  set -o physical
  set -o vi-tabcomplete
  for f in $(ls "$FPATH")
      do
        autoload $f
      done
  alias pd='pushd'
  alias pdd='pushd ~/'
fi


Frederick