diff bash @ 43:b4965a1610f6

[bash] Yaaay bashrc.
author Edho Prima Arief <me@myconan.net>
date Tue, 26 Apr 2011 13:03:31 +0700
parents 34818dfa7f36
children 1f1af28f36e9
line wrap: on
line diff
--- a/bash	Tue Apr 26 12:53:15 2011 +0700
+++ b/bash	Tue Apr 26 13:03:31 2011 +0700
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+
+[ -f .bash.conf.before ] && . .bash.conf.before
+_has_rm_I=
+_has_gnu_ls=
+_has_bsd_ls=
+case "$(uname -s)" in
+  Linux)
+    _has_rm_I=y
+    _has_gnu_ls=y
+  ;;
+  SunOS)
+    [ -x /usr/gnu/bin/rm ] && _has_rm_I=y
+    [ -x /usr/gnu/bin/ls ] && _has_gnu_ls=y
+  ;;
+  *BSD)
+    _has_rm_I=y
+  ;;
+esac
+
+if [ $_has_rm_I = y ]; then
+  alias rm="rm -I"
+else
+  alias rm="rm -i"
+fi
+
+if [ $_has_gnu_ls = y ]; then
+  alias ls="ls -F --color=auto"
+else
+  alias ls="ls -F"
+fi
+
+[ -f .bash.conf.after ] && . .bash.conf.after