Unify username to: lace
[nethome.git] / .bashrc
diff --git a/.bashrc b/.bashrc
index b1eaeeb..a9c5ec8 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -17,10 +17,10 @@ if [ -f /etc/bashrc ];then source /etc/bashrc;fi
 
 function _bash_profile_addpath # <variablename>,<dirpathname>
 {
-       local OPTIND
        local _varname _dirpathname _opt_f _opt_s
        _opt_f=0;_opt_s=0
-       OPTIND=1;while getopts fs got;do
+       unset OPTIND
+       while getopts fs got;do
                case "$got" in
                        [fs]) eval "_opt_$got=1" ;;
                        *) return 1 ;;
@@ -128,9 +128,10 @@ for file in $HOME/.bookmarks.html;do
 export GREP_OPTIONS="--binary-files=without-match --directories=skip"
 if [ -n "$PS1" ];then  # set only in interactive sessions
        export PS1='[bash]${LOGNAME}@${HOSTNAME}:${PWD}# '
-       kbd_mode -u     # utf-8
-       export PS1='\[\017\033%G\]'"$PS1"       # \017=std charmap, \033%G=utf-8
-       # export PS1='\[\017\]'"$PS1"   # \017=std charmap
+       export PS1='\[\017\]'"$PS1"     # \017=std charmap
+       export PS1='\[\033%G\]'"$PS1"   # \033%G=utf-8
+       # Do not: kbd_mode -u # utf-8
+       # as it breaks keyboard state in X and it is not permitted for non-root.
        fi
 export MINICOM="-m -c on"      # metakeys+color
 export HISTSIZE=100000
@@ -141,6 +142,9 @@ uname_p="`uname -p`"; [ "$TERM" = vt220 -a "${uname_p%86}" != "$uname_p" ] && ex
 
 export SOCKS5_SERVER=icsocks.holland.sun.com
 
+# Force English.
+unset LANG LANGUAGE `set|sed -n 's/^\(LC_[^=]*\)=.*$/\1/p'`
+export LANG=en_US.UTF-8
 # Force strcoll() to sort case-sensitively! (empty/undef doesn't work)
 export LC_COLLATE=C
 
@@ -192,6 +196,7 @@ function revlines { perl -e 'my @r=();push @r,$_ while (<>);print pop @r while @
 ulimit -c 0
 set +H
 shopt -s mailwarn
+unset OPTIND
 
 if [ -f "$HOME/.bashrc.local" ];then source "$HOME/.bashrc.local";fi