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