2021-09-11 02:00:17 +00:00
|
|
|
# ~/.bashrc: executed by bash(1) for non-login shells.
|
|
|
|
# We source it in ~/.profile so that it is used for _all_ shells.
|
2011-06-25 17:37:31 +00:00
|
|
|
|
2021-09-11 02:00:17 +00:00
|
|
|
# Don't do anything if the shell isn't interactive
|
|
|
|
case $- in
|
|
|
|
*i*) ;;
|
|
|
|
*) return;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# don't put duplicates or lines starting with a space in the history.
|
|
|
|
HISTCONTROL=ignoreboth
|
|
|
|
# store a long history
|
|
|
|
export HISTSIZE=1000000
|
|
|
|
export HISTFILESIZE=10000000
|
|
|
|
|
|
|
|
# append to the history file rather than overwriting it
|
|
|
|
shopt -s histappend
|
|
|
|
|
|
|
|
# check the window size after each command and, if necessary,
|
|
|
|
# update the values of LINES and COLUMNS.
|
|
|
|
shopt -s checkwinsize
|
|
|
|
|
|
|
|
# all my terminals support color so let's colorize this alllllll
|
|
|
|
PS1="\[\e[33m\][\t] \`if [[ \$? = '0' ]]; then echo \"\[\e[0;32m\]\"; else echo \"\[\e[0;31m\]\"; fi\`\u@\h\[\e[0m\]> "
|
|
|
|
# modify the title bar, too
|
|
|
|
PS1="\[\e]0;\u@\h: \w\a\]$PS1"
|
|
|
|
|
|
|
|
# enable color support of ls and also add handy aliases
|
|
|
|
if [ -x /usr/bin/dircolors ]; then
|
|
|
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
|
|
|
alias ls='ls --color=auto'
|
|
|
|
#alias dir='dir --color=auto'
|
|
|
|
#alias vdir='vdir --color=auto'
|
|
|
|
|
|
|
|
alias grep='grep --color=auto'
|
|
|
|
alias fgrep='fgrep --color=auto'
|
|
|
|
alias egrep='egrep --color=auto'
|
2011-07-10 17:43:51 +00:00
|
|
|
fi
|
|
|
|
|
2021-09-11 02:00:17 +00:00
|
|
|
# enable programmable completion features
|
|
|
|
if ! shopt -oq posix; then
|
|
|
|
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
|
|
|
. /usr/share/bash-completion/bash_completion
|
|
|
|
elif [ -f /etc/bash_completion ]; then
|
|
|
|
. /etc/bash_completion
|
|
|
|
fi
|
|
|
|
fi
|