From ce1d49a44e42ca2267b1946c0c577ba19e39e3dd Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Sun, 8 Aug 2010 20:52:51 -0500 Subject: [PATCH] .bashrc: Do Fink init on OSX, cond alias vi->vim --- .bashrc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.bashrc b/.bashrc index cde4034..c9a4a8f 100644 --- a/.bashrc +++ b/.bashrc @@ -14,6 +14,11 @@ # readline config : ${INPUTRC=~/.inputrc} +if [ "$UNAME" = "Darwin" ]; then + # Fink init, for OSX + test -r /sw/bin/init.sh && source /sw/bin/init.sh +fi + # ---------------------------------------------------------------------- # SHELL OPTIONS # ---------------------------------------------------------------------- @@ -170,6 +175,13 @@ fi # ALIASES / FUNCTIONS # ---------------------------------------------------------------------- +# alias 'vi' to 'vim' if Vim is installed +vim="$(type -P vim)" +test -n "$vim" && { + alias vi='vim' +} +unset vim + # disk usage with human sizes and minimal depth alias du1='du -h --max-depth=1' alias fn='find . -name' -- 2.47.1