comparison 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
comparison
equal deleted inserted replaced
42:ed0a40c3d1e6 43:b4965a1610f6
1 #!/usr/bin/env bash
2
3 [ -f .bash.conf.before ] && . .bash.conf.before
4 _has_rm_I=
5 _has_gnu_ls=
6 _has_bsd_ls=
7 case "$(uname -s)" in
8 Linux)
9 _has_rm_I=y
10 _has_gnu_ls=y
11 ;;
12 SunOS)
13 [ -x /usr/gnu/bin/rm ] && _has_rm_I=y
14 [ -x /usr/gnu/bin/ls ] && _has_gnu_ls=y
15 ;;
16 *BSD)
17 _has_rm_I=y
18 ;;
19 esac
20
21 if [ $_has_rm_I = y ]; then
22 alias rm="rm -I"
23 else
24 alias rm="rm -i"
25 fi
26
27 if [ $_has_gnu_ls = y ]; then
28 alias ls="ls -F --color=auto"
29 else
30 alias ls="ls -F"
31 fi
32
33 [ -f .bash.conf.after ] && . .bash.conf.after