2 ###############################################################################
4 # File: $RCSfile: kshrc,v $
5 # Revision: $Revision: 1.2 $
6 # Description: ksh startup file
7 # Author: Andrew@DeFaria.com
8 # Created: Thu Jun 6 08:31:57 PDT 1996
9 # Modified: $Date: 2005/12/30 08:36:46 $
12 # (c) Copyright 2000-2005, Andrew@DeFaria.com, all rights reserved.
14 ###############################################################################
17 # Check to see if we're interactive
18 if [[ $- = *i* ]]; then
24 if [ "$interactive" = "true" ]; then
25 stty tostop intr ^C kill ^X susp ^Z erase
\b -inpck -istrip -ixany -echok -echonl
28 # Load Runner environment
29 export M_LROOT=/opt/loadrunner
32 adm_base=${adm_base:-$HOME/adm}
35 adm_fpath=${adm_fpath:-$adm_base/functions}
38 if [ -f $adm_fpath/common ]; then
41 echo "Warning: Cannot find $adm_fpath/common!"
45 machines=${machines:-$adm_base/data/machines}
48 if [ -f ~/.rc/set_path ]; then
51 echo "Warning: ~/.rc/set_path does not exist!"
54 # Set DISPLAY properly
55 export DISPLAY=${DISPLAY:-wmoc8888:0}
57 if [ -x ~/.rc/logout ]; then
62 if [ -f ~/.rc/clearcase ]; then
67 if [ -f ~/.rc/multisite ]; then
71 # Import shell functions:
72 if [ -f ~/.rc/functions ]; then
90 if [ "$TERM" = "hpterm" -o \
92 "$TERM" = "dtterm" -o \
93 "$TERM" = "vt100" -o \
94 "$TERM" = "vt220" ]; then
101 if [ ! -z "$less" ]; then
102 export LESS=eiM; alias more=less
103 export PAGER="less -s"
109 export PS4='${0##*/} line $LINENO:'
114 # Fix TERM for 9.x machines running dtterm.
115 if [ "$TERM" = "dtterm" ]; then
121 "/usr/dt/bin/dtksh" | \
125 trap vi_completion KEYBD
126 elif [ -o emacs ]; then
127 trap emacs_completion KEYBD
129 trap "eval $(resize)" WINDOW