changeset 49:b924652e169d

[bash] Various tweaks: prompt, unset for check variables, etc
author Edho Prima Arief <me@myconan.net>
date Wed, 27 Apr 2011 22:38:44 +0700
parents 416f9d3e9ee8
children b7a63c71b07f
files bash
diffstat 1 files changed, 14 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/bash	Wed Apr 27 21:35:20 2011 +0700
+++ b/bash	Wed Apr 27 22:38:44 2011 +0700
@@ -1,9 +1,15 @@
 #!/usr/bin/env bash
 
-[ -n "${echo_bash}" ] && return
-ecos_bash=y
+[ -f .ecos_bash.before ] && . .ecos_bash.before
+
+export PATH="${HOME}/.ecos_bin:${HOME}/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
 
-[ -f .ecos_bash.before ] && . .ecos_bash.before
+PS1='[\u@\h \W]\$ '
+
+export PAGER='less -Rins'
+export EDITOR=vi
+
+alias less='less -Rins'
 _has_rm_I=
 _has_gnu_ls=
 _has_bsd_ls=
@@ -15,12 +21,12 @@
   SunOS)
     [ -x /usr/gnu/bin/rm ] && _has_rm_I=y
     [ -x /usr/gnu/bin/ls ] && _has_gnu_ls=y
+    [ -d /usr/gnu/bin ] && export PATH="/usr/gnu/bin:${PATH}"
   ;;
   *BSD)
     _has_rm_I=y
   ;;
 esac
-
 if [ $_has_rm_I = y ]; then
   alias rm="rm -I"
 else
@@ -33,4 +39,8 @@
   alias ls="ls -F"
 fi
 
+unset _has_rm_I
+unset _has_gnu_ls
+unset _has_bsd_ls
+
 [ -f .ecos_bash.after ] && . .ecos_bash.after