#! /bin/bash # This is a ".bashrc" file. ################################################################ # # Shell variables export HOME=/cygdrive/e/buja # These PATH additions must be adapted to your configuration. In # particular, you might not have "gsview", "mpack", "mozilla", "miktex". # Also, emacs probably resides on the "c:" drive on your machine, and # it will be nested one level less than here: PATH=/cygdrive/c/Program\ Files/Microsoft\ Office/Office:$PATH PATH=/cygdrive/c/Program\ Files/mozilla.org/Mozilla:$PATH PATH=/cygdrive/c/Ghostgum/gsview:$PATH PATH=/cygdrive/c/Program\ Files/R/rw1040/bin:$PATH PATH=/cygdrive/c/mpack/:$PATH PATH=/cygdrive/c/texmf/miktex/bin:$PATH PATH=/cygdrive/e/emacs/emacs-21.2/bin:$PATH PATH=~/bin:$PATH PATH=.:$PATH export PATH # Issues: # Re.: There is an unaccounted "." at the end of PATH. Does "bash" set it? # It probably also adds the W2K path with the "c:/WINNT" directories. # Re.: bash within emacs. We start it with "--login" which triggers # cygwin's "/etc/profile" that adds its "/bin", "/usr/bin", "/usr/local/bin" # as well as "/usr/X11R6/bin" in the "/etc/profile.d"-descendent. # See the variable "explicit-bash-args" which we set in ~/.emacs. # (cygwin has the wisdom of using "/cygdrive/e" for "e:" to make Unix-style PATH work) # For traditional order of ASCIIs, i.e., avoiding locale-dependent conventions: # want .xxx first, then upper case XXX, then lower case xxx (traditional order) export LC_ALL=C # define DISPLAY export DISPLAY=`ipconfig | gawk '/IP Address/ {print $NF;}'`":0" # for others to find emacs: export EMACSDIR='e:/emacs/emacs-21.2/' ################################################################ # # want intervals in regular gawk expressions, and universal record separators: alias gawk='gawk --re-interval --assign RS="(\r\n)|\n|\r"' ################################################################ # # shell prompt: show path of current directory export PS1=`pwd | gawk '{gsub("/cygdrive/",""); sub("/",":/"); print;}'`" " function _cd { cd "$@" PS1=`pwd | gawk '{gsub("/cygdrive/",""); if(length($0)==1) $0=$0":/"; if(substr($0,2,1)!=":") { sub("/",":/"); }; print;}'`" " export PS1 } alias cd=_cd ################################################################