# vim:filetype=sh # .bashrc, the minimal stuff I can't live without ## file include macro, tests for readability include() { local arg for arg; do if [ -r "$arg" ]; then . "$arg" fi done } ## grep speedup hack if test -n "$LC_ALL"; then lc_all="$LC_ALL" LC_ALL=C else LC_ALL=C fi export LC_ALL ## include in every shell include ~/.bash_functions_noti ## gen PATH, etc. repath ## interactive shell? if [ -n "$PS1" ]; then ## interactive shell, so non-interactive, non-login child shells ## should also load this file if started manually export BASH_ENV="~/.bashrc" ## include only in interactive shells include ~/.bash_functions ~/.bash_aliases ~/.bash_prompt \ ~/.bashrci ~/.bash_local fi ## always define PAGER and EDITOR if _exists vim; then EDITOR=vim else EDITOR=vi fi if _exists less; then PAGER=less else PAGER=more fi ## less options: ## R - output ANSI color escape sequences as-is ## d - don't complain if terminal is dumb ## i - case-insensitive search by default; note that any upper-case letter ## makes the search case-sensitive ## s - consecutive blank lines are squeezed into a single blank line ## F - quit if output fits in one screen ## X - don't send termcap init/de-init strings to terminal (prevents cls) ## M - display in prompt displayed lines / total LESS="-RdisFXM" type -p lesspipe &> /dev/null && eval `lesspipe` [ -x /usr/bin/lesspipe.sh ] && export LESSOPEN="|/usr/bin/lesspipe.sh %s" export EDITOR PAGER LESS ## include in every shell include ~/.bash_local_noti ## undo grep speedup hack if test -n "$lc_all"; then LC_ALL="$lc_all" unset lc_all else unset LC_ALL fi if [ $EUID -eq 0 ]; then # files go-w umask 022 else # files o-w umask 002 fi # dump cores ulimit -c unlimited ## use ssh instead of rsh in cvs CVS_RSH=ssh ## gzip: maximum compression GZIP="-9" export CVS_RSH GZIP