9d5844
#
9d5844
# /etc/kshrc is sourced in interactive shells.  It
9d5844
# should contain commands to set up aliases, functions,
9d5844
# options, key bindings, etc.
9d5844
#
9d5844
9d5844
# Set prompts
9d5844
#PROMPT='[%n@%m]%~%# '    # default prompt
9d5844
#RPROMPT=' %~'     # prompt for right side of screen
9d5844
9d5844
_src_etc_profile_d()
9d5844
{
9d5844
    # from zshrc, with ksh fixes
9d5844
    if [[ ! -o login ]]; then # We're not a login shell
9d5844
        for i in /etc/profile.d/*.sh; do
9d5844
	    if [ -r "$i" ]; then
9d5844
	        . $i
9d5844
	    fi
9d5844
        done
9d5844
        unset i
9d5844
    fi
9d5844
}
e3b3c9
e3b3c9
pathmunge () {
e3b3c9
case ":${PATH}:" in
e3b3c9
*:"$1":*)
e3b3c9
    ;;
e3b3c9
*)
e3b3c9
    if [ "$2" = "after" ]; then
e3b3c9
        PATH=$PATH:$1
e3b3c9
    else
e3b3c9
        PATH=$1:$PATH
e3b3c9
    fi
e3b3c9
esac
e3b3c9
}
e3b3c9
9d5844
_src_etc_profile_d
9d5844
9d5844
unset -f _src_etc_profile_d
e3b3c9
unset -f pathmunge
018b0a
018b0a
# key bindings - make Delete, Home, End,... work
018b0a
keybd_trap () {
018b0a
  case ${.sh.edchar} in
018b0a
    $'\e[1~') .sh.edchar=$'\001';; # Home = beginning-of-line
018b0a
    $'\e[F')  .sh.edchar=$'\005';; # End = end-of-line
018b0a
    $'\e[5~') .sh.edchar=$'\e>';; # PgUp = history-previous
018b0a
    $'\e[6~') .sh.edchar=$'\e<';; # PgDn = history-next
018b0a
    $'\e[3~') .sh.edchar=$'\004';; # Delete = delete-char
018b0a
  esac
018b0a
}
018b0a
trap keybd_trap KEYBD
018b0a