Difference between revisions of "Main Page/Stuff/redhat installation/etc bashrc"

From phurvitz
Jump to: navigation, search
 
Line 1: Line 1:
<tt>
+
<pre>
 
# /etc/bashrc
 
# /etc/bashrc
  
Line 73: Line 73:
 
#XTIDE
 
#XTIDE
 
export HFILE_PATH=/usr/local/share/xtide/harmonics-dwf-20070318.tcd
 
export HFILE_PATH=/usr/local/share/xtide/harmonics-dwf-20070318.tcd
</tt>
+
</pre>

Latest revision as of 20:00, 22 February 2011

# /etc/bashrc

# System wide functions and aliases
# Environment stuff goes in /etc/profile

# by default, we want this to get set.
# Even for non-interactive, non-login shells.
if [ "`id -gn`" = "`id -un`" -a `id -u` -gt 99 ]; then
        umask 002
else
        umask 022
fi

# are we an interactive shell?
if [ "$PS1" ]; then
    if [ -x /usr/bin/tput ]; then
      if [ "x`tput kbs`" != "x" ]; then # We can't do this with "dumb" terminal
        stty erase `tput kbs`
      elif [ -x /usr/bin/wc ]; then
        if [ "`tput kbs|wc -c `" -gt 0 ]; then # We can't do this with "dumb" terminal
          stty erase `tput kbs`
        fi
      fi
    fi
    case $TERM in
        xterm*)
                if [ -e /etc/sysconfig/bash-prompt-xterm ]; then
                        PROMPT_COMMAND=/etc/sysconfig/bash-prompt-xterm
                else
                PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\007"'
                fi
                ;;
        screen)
                if [ -e /etc/sysconfig/bash-prompt-screen ]; then
                        PROMPT_COMMAND=/etc/sysconfig/bash-prompt-screen
                else
                PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\033\\"'
                fi
                ;;
        *)
                [ -e /etc/sysconfig/bash-prompt-default ] && PROMPT_COMMAND=/etc/sysconfig/bash-prompt-default
            ;;
    esac
    # Turn on checkwinsize
    shopt -s checkwinsize
    [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "

    if [ "x$SHLVL" != "x1" ]; then # We're not a login shell
        for i in /etc/profile.d/*.sh; do
            if [ -r "$i" ]; then
                . $i
            fi
        done
    fi
fi
# vim:ts=4:sw=4

#prompt
PS1="\n\u@\h \w\n\! % "

# aliases
alias h='history 10'
alias hg='history |grep'
alias psef='ps -ef |grep'
alias ltr='ls -ltr'
alias la='ls -a'
alias lo='exit'
alias mroe='more'
alias so='source'
alias xt='xterm -ls -sb -sl 5000 -geometry 80x40 -vb -bg black -fg white&'

#XTIDE
export HFILE_PATH=/usr/local/share/xtide/harmonics-dwf-20070318.tcd