560f4e
#
560f4e
# /etc/zshrc is sourced in interactive shells.  It
560f4e
# should contain commands to set up aliases, functions,
560f4e
# options, key bindings, etc.
560f4e
#
560f4e
560f4e
## shell functions
560f4e
#setenv() { export $1=$2 }  # csh compatibility
560f4e
560f4e
# Set prompts
560f4e
PROMPT='[%n@%m]%~%# '    # default prompt
560f4e
#RPROMPT=' %~'     # prompt for right side of screen
560f4e
560f4e
# bindkey -v             # vi key bindings
560f4e
# bindkey -e             # emacs key bindings
560f4e
bindkey ' ' magic-space  # also do history expansion on space
560f4e
560f4e
# Provide pathmunge for /etc/profile.d scripts
560f4e
pathmunge()
560f4e
{
560f4e
    if ! echo $PATH | /bin/grep -qE "(^|:)$1($|:)" ; then
560f4e
        if [ "$2" = "after" ] ; then
560f4e
            PATH=$PATH:$1
560f4e
        else
560f4e
            PATH=$1:$PATH
560f4e
        fi
560f4e
    fi
560f4e
}
560f4e
560f4e
_src_etc_profile_d()
560f4e
{
560f4e
    #  Make the *.sh things happier, and have possible ~/.zshenv options like
560f4e
    # NOMATCH ignored.
560f4e
    emulate -L ksh
560f4e
560f4e
560f4e
    # from bashrc, with zsh fixes
560f4e
    if [[ ! -o login ]]; then # We're not a login shell
560f4e
        for i in /etc/profile.d/*.sh; do
560f4e
	    if [ -r "$i" ]; then
560f4e
	        . $i
560f4e
	    fi
560f4e
        done
560f4e
        unset i
560f4e
    fi
560f4e
}
560f4e
_src_etc_profile_d
560f4e
560f4e
unset -f pathmunge _src_etc_profile_d
560f4e