X-Git-Url: https://git.sev.monster/~sev/dotfiles.git/blobdiff_plain/7172209258bdbb25ba4d43eba17f50d72719bf75..3cec048120c6d59a3f8916078f8f6a99d3e70025:/base/.zprofile diff --git a/base/.zprofile b/base/.zprofile index aa57163..7a7fc10 100644 --- a/base/.zprofile +++ b/base/.zprofile @@ -1,15 +1,28 @@ -#XXX: ensure we override /etc/profile, gets loaded after .zshenv -source ~/.zshenv - -t="${TMPDIR:-/tmp}/home-$LOGNAME" -h="$HOME/tmp" -if [[ ! -e "$t" ]] { - mkdir -m 700 "$t" > /dev/null 2>&1 - #TODO: check if dir exists after mkdir -} -#allow opaque entries to override -if [[ ! -e "$h" ]] { - ln -sf "$t" "$h" > /dev/null 2>&1 +### exports +## reset PATH to prevent /etc/zprofile from changing it +# some distros put non-interactive PATH in env and interactive PATH in profile; +# we want to make sure to always use ours regardless +if [[ -v _backup_path ]] { + path=("${_backup_path[@]}" "${path[@]}") + export PATH + unset _backup_path } -unset t -unset h +## common +export EDITOR=vim +export PAGER=less +## grep +# XXX: deprecated in GNU +export GREP_OPTIONS=--color=auto +## histfile +export HISTFILE=~/.histfile +export HISTSIZE=1000 +export SAVEHIST=1000 +## python +export PYTHONSTARTUP=~/.pythonrc +## perl +[[ -v commands[perl] ]] && eval $(perl -I $XDG_DATA_HOME/perl5/lib/perl5 -Mlocal::lib=$XDG_DATA_HOME/perl5 2>/dev/null) + +### load site-specific +if [[ -f ~/.zprofile.local ]] { source ~/.zprofile.local } + +# vim: set et sts=4 sw=4 ts=8 tw=79 :