Mercurial > ec-dotfiles
diff bash @ 102:7a287a518718
Merge.
author | Edho Prima Arief <edho@myconan.net> |
---|---|
date | Thu, 18 Aug 2011 15:20:54 +0700 |
parents | 29bd7f6ef58a a1c6b40a535f |
children | 0e8018fb4203 |
line wrap: on
line diff
--- a/bash Thu Aug 18 15:15:06 2011 +0700 +++ b/bash Thu Aug 18 15:20:54 2011 +0700 @@ -1,28 +1,33 @@ #!/usr/bin/env bash -[ -f .ecos_bash.before ] && . .ecos_bash.before +[ -f "${HOME}/.ecos_bash.before" ] && . "${HOME}/.ecos_bash.before" -PATH="${HOME}/.ecos_bin:${HOME}/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" +_org_path="${PATH}" +export PATH="${HOME}/.ecos_bin:${HOME}/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" PS1='[\u@\h \W]\$ ' export PAGER="less -Rins" export EDITOR=vi export LANG="en_US.UTF-8" +unset LS_COLORS alias less="less -Rins" #assuming POSIX grep alias fgrep="grep -F" alias egrep="grep -E" +alias ls="ls -F" +alias rm="rm -i" +alias rd="rdesktop -g 1280x600 -K -a 16 -z -P -r sound:off -r clipboard:CLIPBOARD -5" _has_rm_I= _has_gnu_ls= _has_gnu_grep= -_has_bsd_ls= case "$(uname -s)" in Linux) _has_rm_I=y _has_gnu_ls=y + _has_gnu_grep=y ;; SunOS) [ -x /usr/gnu/bin/rm ] && _has_rm_I=y @@ -32,6 +37,7 @@ [ -d /opt/csw/bin ] && PATH="/opt/csw/bin:${PATH}" [ -d /opt/csw/sbin ] && PATH="/opt/csw/sbin:${PATH}" [ -d /usr/gnu/bin ] && PATH="/usr/gnu/bin:${PATH}" + export PATH alias ping="ping -s" alias ping6="ping -A inet6" ;; @@ -39,29 +45,25 @@ _has_rm_I=y CLICOLOR= ;; + OpenBSD) + if command -v colorls > /dev/null 2>&1; then + export CLICOLOR= + alias ls='colorls -F' + fi + ;; + CYGWIN*) + export PATH="${PATH}:${_org_path}" + ;; 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 - -if [ "${_has_gnu_grep}" = y ]; then - alias grep="grep --color=auto" -fi +[ "${_has_rm_I}" = y ] && alias rm="rm -I" +[ "${_has_gnu_ls}" = y ] && alias ls="ls -F --color=auto" +[ "${_has_gnu_grep}" = y ] && alias grep="grep --color=auto" unset _has_rm_I unset _has_gnu_ls unset _has_gnu_grep -unset _has_bsd_ls -export PATH case "${TERM}" in xterm*|screen*|dtterm) @@ -69,5 +71,8 @@ ;; esac -command -v vim > /dev/null 2>&1 && alias vi=vim -[ -f .ecos_bash.after ] && . .ecos_bash.after +if command -v vim > /dev/null 2>&1; then + alias vi=vim + export EDITOR=vim +fi +[ -f "${HOME}/.ecos_bash.after" ] && . "${HOME}/.ecos_bash.after"