Blame SOURCES/kshrc.rhs

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