############ -*- Mode: shell-script; coding: utf-8 -*- #### # ~ippei/.zshenv # written by kishida@imat.eng.osaka-cu.ac.jp # last-modified: 2016/06/13 19:39:05. # 修正、改変、再配布何でも可 # cf: man zshall, zshoptions ############################################################ # ~/.zshenv には対話的な機能以外の部分を記述すべき # 例えば、ssh remote ls とかでリモートホストにコマンドを投げる場合は # ~/.zshenv のみ有効で ~/.zshrc などは有効にならない # この場合 ~/.zshenv に PATH の設定がなければ ls は実行できない ############################################################ #### ARCHI if [ -x /usr/bin/uname ] || [ -x /bin/uname ]; then case "`uname -sr`" in FreeBSD*); export ARCHI="freebsd" ;; Linux*); export ARCHI="linux" ;; CYGWIN*); export ARCHI="cygwin" ;; IRIX*); export ARCHI="irix" ;; OSF1*); export ARCHI="osf1" ;; Darwin*); export ARCHI="darwin" ;; #Mac OS X *); export ARCHI="dummy" ;; esac else export ARCHI="dummy" fi #### HOST if [ -x /bin/hostname ]; then export HOST=`hostname` fi; export host=`echo $HOST | sed -e 's/\..*//'` #if [ $UID = 0 ] ; then #export HOME=/root #fi export UID export SHELL=`which zsh` export CC=`which gcc` export HTTP_HOME="$HOME/.w3m/bookmark.html" # for w3m export FTP_PASSIVE_MODE="NO" setopt BRACE_CCL #export TEXINPUTS="$HOME/tex/:" #export TEXINPUTS="/usr/local/texlive/2013/texmf-dist/tex/latex//;$HOME/tex/;./;" #export TEXINPUTS="/usr/local/texlive/2013/texmf-dist/tex/latex//;/usr/local/texlive/2012/texmf-dist/tex/latex//;$HOME/tex/;./;" export TEXINPUTS="/usr/local/texlive/2013/texmf-dist/tex/latex//;/usr/local/texlive/2012/texmf-dist/tex/latex//;./;" ## UTF-8 export LANG="ja_JP.UTF-8" # or ja_JP.UTF8 export LC_ALL="ja_JP.UTF-8" # or ja_JP.UTF8 export LC_CTYPE="ja_JP.UTF-8" #export LC_ALL="ja_JP.UTF-8-EAW-FULLWIDTH" #export LC_CTYPE="ja_JP.UTF-8-EAW-FULLWIDTH" #export LANG=C #export LC_ALL=C #export LC_CTYPE=C ## Intel MKL MKLVARS="${HOME}/.zshenv_mklvars32" #MKLVARS="/opt/intel/mkl/10.2.5.035/tools/environment/mklvars32.sh" #MKLVARS="/opt/intel/Compiler/11.1/072/mkl/tools/environment/mklvars64.sh" #MKLVARS="/opt/intel/Compiler/11.1/072/mkl/tools/environment/mklvars32.sh" if [ -e $MKLVARS ]; then source $MKLVARS fi #export XMODIFIERS="@im=skkinput" export GNUSTEP_USER_ROOT="$HOME/.GNUstep" if [ $MACHTYPE = "x86_64" ] ; then ARCHI_INTEL_COMPILER="intel64" ARCHI_INTEL_MKL="em64t" elif [ $MACHTYPE = "i686" ] ; then ARCHI_INTEL_COMPILER="ia32" ARCHI_INTEL_MKL="32" else ARCHI_INTEL_COMPILER="other" ARCHI_INTEL_MKL="other" fi #PATH, command search path typeset -U path # 重複したパスを登録しない。 path=( # (N-/): 存在しないディレクトリは登録しない。 # パス(...): ...という条件にマッチするパスのみ残す。 # N: NULL_GLOBオプションを設定。globがマッチしなかったり存在しないパスを無視。 # -: シンボリックリンク先のパスを評価。 # /: ディレクトリのみ残す。 $HOME/.gem/ruby/*/bin(N-/) # rake in ~/.gem prior to /usr/bin/rake $HOME/.cabal/bin(N-/) # rake in ~/.gem prior to /usr/bin/rake $path /bin(N-/) /usr/local/bin(N-/) /usr/bin(N-/) /usr/games(N-/) /sbin(N-/) /usr/sbin(N-/) /usr/local/sbin(N-/) $HOME/bin(N-/) /var/lib/gems/*/bin(N-/) $HOME/opt/*/bin(N-/) $HOME/opt/phonopy-*/bin(N-/) /opt/intel/Compiler/11.1/072/bin/${ARCHI_INTEL_COMPILER}(N-/) #/opt/jdk1.7.0_11/bin(N-/) /opt/bin(N-/) /opt/*/bin(N-/) /opt/adt-bundle-linux-x86/sdk/tools(N-/) /usr/local/calc/bin(N-/) /usr/local/maui/bin(N-/) /opt/local/bin(N-/) #MacOSX /opt/local/sbin(N-/) #MacOSX ) typeset -xT LD_LIBRARY_PATH ld_library_path typeset -U LD_LIBRARY_PATH # 重複したパスを登録しない。 ld_library_path=( /usr/lib(N-/) /usr/local/lib(N-/) /opt/intel/Compiler/11.1/072/lib/${ARCHI_INTEL_COMPILER}(N-/) /opt/intel/Compiler/11.1/072/mkl/lib/${ARCHI_INTEL_MKL}(N-/) /opt/intel/Compiler/11.1/072/lib/intel64(N-/) #/opt/intel/lib/${ARCHI_INTEL_COMPILER}(N-/) /opt/intel/mkl/lib/${ARCHI_INTEL_COMPILER}(N-/) /opt/intel/lib/intel64(N-/) /opt/*/lib(N-/) $HOME/opt/lib ) typeset -xT LIBRARY_PATH library_path typeset -U LIBRARY_PATH # 重複したパスを登録しない。 library_path=( /opt/intel/Compiler/11.1/072/mkl/lib/${ARCHI_INTEL_MKL}(N-/) ) typeset -xT RUBYLIB rubylib typeset -U RUBYLIB rubylib=( $HOME/lib(N-/) $HOME/.gem/ruby/*/gems(N-/) #$HOME/local/spglib-1.0.9/test(N-/) /usr/local/lib/ruby/site_ruby/1.9.1/*(N-/) /usr/local/lib/site_ruby/1.9.1/x86_64-linux(N-/) /usr/local/lib/x86_64-linux-gnu/site_ruby(N-/) /var/lib/gems/1.9.1/gems(N-/) #/usr/lib/ruby/1.9.1(N-/) #/usr/local/lib/ruby/1.9.1(N-/) . ) #export GEM_HOME=/var/lib/gems/1.9.1 #export GEM_HOME="${HOME}/.gem/ruby/2.0.0/" export GEM_HOME="${HOME}/.gem/ruby/2.3.0/" export COGUE_POTCAR_PATH=$HOME/opt/vasp/potcar/cogue_potcar_dir #$DIR_PREFIX/cogue_potcar_dir typeset -xT PYTHONPATH pythonpath typeset -U PYTHONPATH pythonpath=( $HOME/opt/phonopy-1.7.6/lib/python $HOME/opt/cogue/lib/python ) export MANPATH="/usr/local/man:/usr/X11R6/man:/usr/share/man" export NLSPATH="/usr/local/man:/usr/X11R6/man:/usr/share/man" export INFOPATH="$HOME/info:/usr/share/info:/usr/local/info" RSENSE_HOME=$HOME/opt/rsense-0.3 typeset -xT INCLUDE include typeset -U INCLUDE include=( ./ /usr/include/ /usr/local/include/ /opt/intel/Compiler/11.1/072/include/ /opt/intel/Compiler/11.1/072/mkl/include/ $INCLUDE ) export PAGER="less" ##### $COLORTERM #export COLORTERM=0 #case "$TERM" in # xterm*); COLORTERM=1 ;; # putty # mlterm*); COLORTERM=1 ; TERM='kterm-color';; # screen*); COLORTERM=1 ;; # #rxvt*); COLORTERM=1 ; TERM='kterm-color';; # rxvt*); COLORTERM=1 ;; # ct100*); COLORTERM=1 ;; # TeraTermPro # kterm*); COLORTERM=1 ; TERM='kterm-color' #esac #if [ $ARCHI = "freebsd" ] ; then # export TERM='rxvt' #fi #### EDITOR export EDITOR='vi' if which vim >& /dev/null ; then alias vi="vim" export EDITOR='vim' fi autoload zargs ## Sun Grid Engine export SGE_ROOT=/var/lib/gridengine #this is the path on our machines export SGE_CELL=default ### rbenv #export RBENV_ROOT=~/opt/rbenv #export PATH="$PATH:$RBENV_ROOT/bin" #eval "$(rbenv init -)" ## 個人情報を含む設定や上書き用 if [ -e ~/.zshenv_private ]; then source ~/.zshenv_private fi