2015-06-26 13:06:30 -06:00
|
|
|
# Sourced in login shells before .zshrc
|
|
|
|
# Commands that should be exectued only in login shells
|
|
|
|
# Do not set environment variables
|
|
|
|
# Do not define alias, functions, options, etc.
|
2012-05-22 12:49:45 -04:00
|
|
|
#
|
2015-06-26 13:06:30 -06:00
|
|
|
# $ZDOTDIR/.zshenv
|
|
|
|
# $ZDOTDIR/.zprofile
|
|
|
|
# $ZDOTDIR/.zshrc
|
|
|
|
# $ZDOTDIR/.zlogin
|
2012-05-22 12:49:45 -04:00
|
|
|
|
2013-11-23 04:23:56 -08:00
|
|
|
# Browser
|
2015-06-26 13:06:30 -06:00
|
|
|
case `/usr/bin/uname -s` in
|
|
|
|
Darwin)
|
|
|
|
export BROWSER='open'
|
|
|
|
;;
|
|
|
|
esac
|
2013-11-23 04:23:56 -08:00
|
|
|
|
|
|
|
# Editors
|
2015-06-26 13:06:30 -06:00
|
|
|
export EDITOR='vim'
|
|
|
|
export VISUAL='vim'
|
2013-11-23 04:23:56 -08:00
|
|
|
export PAGER='less'
|
2015-06-26 13:06:30 -06:00
|
|
|
export LESSEDIT='vim'
|
2013-11-23 04:23:56 -08:00
|
|
|
|
|
|
|
# Language
|
|
|
|
if [[ -z "$LANG" ]]; then
|
|
|
|
export LANG='en_US.UTF-8'
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Set the default Less options.
|
|
|
|
# Mouse-wheel scrolling has been disabled by -X (disable screen clearing).
|
|
|
|
# Remove -X and -F (exit if the content fits on one screen) to enable it.
|
|
|
|
export LESS='-F -g -i -M -R -S -w -X -z-4'
|
|
|
|
|
|
|
|
# Set the Less input preprocessor.
|
2014-05-03 15:56:36 -05:00
|
|
|
# Try both `lesspipe` and `lesspipe.sh` as either might exist on a system.
|
|
|
|
if (( $#commands[(i)lesspipe(|.sh)] )); then
|
|
|
|
export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-"
|
2013-11-23 04:23:56 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Temporary Files
|
|
|
|
if [[ ! -d "$TMPDIR" ]]; then
|
2015-02-13 00:00:27 -05:00
|
|
|
export TMPDIR="/tmp/$LOGNAME"
|
2013-11-23 04:23:56 -08:00
|
|
|
mkdir -p -m 700 "$TMPDIR"
|
|
|
|
fi
|
|
|
|
|
|
|
|
TMPPREFIX="${TMPDIR%/}/zsh"
|
2015-08-04 16:05:30 -06:00
|
|
|
|