view bash @ 47:684a22aeb675

[setup] .blah.hur => .blah_hur
author Edho Prima Arief <me@myconan.net>
date Wed, 27 Apr 2011 21:23:57 +0700
parents 1f1af28f36e9
children 416f9d3e9ee8
line wrap: on
line source

#!/usr/bin/env bash

[ -n "${echo_bash}" ] && return
ecos_bash=y

[ -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