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