Mercurial > ec-dotfiles
comparison rc/bash @ 266:69b9cbf9f3c0
rm -I saner test.
| author | Edho Arief <edho@myconan.net> |
|---|---|
| date | Thu, 24 Nov 2011 13:02:04 +0700 |
| parents | c6c322c57e0e |
| children | e35a36bb832e |
comparison
equal
deleted
inserted
replaced
| 264:c6c322c57e0e | 266:69b9cbf9f3c0 |
|---|---|
| 32 alias egrep="grep -E" | 32 alias egrep="grep -E" |
| 33 alias ls="ls -F" | 33 alias ls="ls -F" |
| 34 alias rm="rm -i" | 34 alias rm="rm -i" |
| 35 alias rd="rdesktop -g 1280x600 -K -a 16 -z -P -r sound:off -r clipboard:CLIPBOARD -5" | 35 alias rd="rdesktop -g 1280x600 -K -a 16 -z -P -r sound:off -r clipboard:CLIPBOARD -5" |
| 36 | 36 |
| 37 _has_rm_I= | |
| 38 _has_gnu_ls= | 37 _has_gnu_ls= |
| 39 _has_gnu_grep= | 38 _has_gnu_grep= |
| 40 _ls="ls" | 39 _ls="ls" |
| 41 case "$(uname -s)" in | 40 case "$(uname -s)" in |
| 42 Linux) | 41 Linux) |
| 43 _has_rm_I=y | |
| 44 _has_gnu_ls=y | 42 _has_gnu_ls=y |
| 45 _has_gnu_grep=y | 43 _has_gnu_grep=y |
| 46 ;; | 44 ;; |
| 47 SunOS) | 45 SunOS) |
| 48 [ -x /usr/gnu/bin/rm ] && _has_rm_I=y | |
| 49 [ -x /usr/gnu/bin/ls ] && _has_gnu_ls=y | 46 [ -x /usr/gnu/bin/ls ] && _has_gnu_ls=y |
| 50 [ -x /usr/gnu/bin/grep ] && _has_gnu_grep=y | 47 [ -x /usr/gnu/bin/grep ] && _has_gnu_grep=y |
| 51 # Higher priority directories | 48 # Higher priority directories |
| 52 for i in {/opt/csw,/usr/gnu}/{,s}bin; do | 49 for i in {/opt/csw,/usr/gnu}/{,s}bin; do |
| 53 [ -d "${i}" ] && PATH="${i}:${PATH}" | 50 [ -d "${i}" ] && PATH="${i}:${PATH}" |
| 58 alias ping="ping -s" | 55 alias ping="ping -s" |
| 59 alias ping6="ping -A inet6" | 56 alias ping6="ping -A inet6" |
| 60 [ -f "/usr/share/lib/terminfo/?/${TERM}" ] || export TERM=dtterm | 57 [ -f "/usr/share/lib/terminfo/?/${TERM}" ] || export TERM=dtterm |
| 61 ;; | 58 ;; |
| 62 FreeBSD) | 59 FreeBSD) |
| 63 _has_rm_I=y | |
| 64 export CLICOLOR= | 60 export CLICOLOR= |
| 65 export LSCOLORS=ExGxFxdxCxegedabagExEx | 61 export LSCOLORS=ExGxFxdxCxegedabagExEx |
| 66 ;; | 62 ;; |
| 67 OpenBSD) | 63 OpenBSD) |
| 68 PATH="${PATH}:/usr/X11R6/bin" | 64 PATH="${PATH}:/usr/X11R6/bin" |
| 89 CYGWIN*) | 85 CYGWIN*) |
| 90 export PATH="${PATH}:${_org_path}" | 86 export PATH="${PATH}:${_org_path}" |
| 91 ;; | 87 ;; |
| 92 esac | 88 esac |
| 93 | 89 |
| 94 [ "${_has_rm_I}" = y ] && alias rm="rm -I" | |
| 95 [ "${_has_gnu_ls}" = y ] && alias ls="${_ls} -F --color=auto" | 90 [ "${_has_gnu_ls}" = y ] && alias ls="${_ls} -F --color=auto" |
| 96 [ "${_has_gnu_grep}" = y ] && alias grep="grep --color=auto" | 91 [ "${_has_gnu_grep}" = y ] && alias grep="grep --color=auto" |
| 97 | 92 |
| 98 unset _has_rm_I | |
| 99 unset _has_gnu_ls | 93 unset _has_gnu_ls |
| 100 unset _has_gnu_grep | 94 unset _has_gnu_grep |
| 101 unset _ls | 95 unset _ls |
| 102 | 96 |
| 103 # Custom application I usually install and safe to prioritize | 97 # Custom application I usually install and safe to prioritize |
| 136 | 130 |
| 137 if command -v vim > /dev/null 2>&1; then | 131 if command -v vim > /dev/null 2>&1; then |
| 138 alias vi=vim | 132 alias vi=vim |
| 139 export EDITOR=vim | 133 export EDITOR=vim |
| 140 fi | 134 fi |
| 135 | |
| 136 rm -If "/tmp/.nonexistent.$(date '+%Y%m%d%H%M%S')" 2> /dev/null && alias rm="rm -I" | |
| 137 | |
| 141 [ -f "${HOME}/.ecos_bash.after" ] && . "${HOME}/.ecos_bash.after" | 138 [ -f "${HOME}/.ecos_bash.after" ] && . "${HOME}/.ecos_bash.after" |
| 142 | 139 |
