2014-04-27 18:46:00 +00:00
|
|
|
# Asara's bashrc
|
|
|
|
|
2013-10-28 13:41:02 +00:00
|
|
|
# Check if the shell is non-interactive
|
2024-04-11 19:25:48 +00:00
|
|
|
if [[ $- != *i* ]]; then
|
2013-10-28 13:41:02 +00:00
|
|
|
# Shell is non-interactive. Be done now!
|
|
|
|
return
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Ignore duplicate commands and commands starting with a space for Bash history
|
|
|
|
HISTCONTROL=ignoredups:ignorespace
|
|
|
|
|
|
|
|
# Bash History file size
|
2024-04-11 19:25:48 +00:00
|
|
|
HISTSIZE=100000
|
|
|
|
HISTFILESIZE=2000000
|
2014-04-27 18:42:55 +00:00
|
|
|
|
|
|
|
# fix text wrap based on windows size
|
2013-10-28 13:41:02 +00:00
|
|
|
shopt -s checkwinsize
|
2014-04-27 18:42:55 +00:00
|
|
|
# append to the history file, don't overwrite it
|
|
|
|
shopt -s histappend
|
|
|
|
# entering directory name will automatically cd to it.
|
|
|
|
shopt -s autocd
|
|
|
|
# make multiline input single line in history (i.e. \)
|
|
|
|
shopt -s cmdhist
|
|
|
|
|
2013-10-28 13:41:02 +00:00
|
|
|
# enable color support of ls and also add handy aliases
|
|
|
|
if [ -x /usr/bin/dircolors ]; then
|
2024-04-11 19:25:48 +00:00
|
|
|
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'
|
2013-10-28 13:41:02 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# some ls aliases
|
|
|
|
alias ll='ls -alF'
|
|
|
|
alias la='ls -A'
|
|
|
|
alias l='ls -CF'
|
|
|
|
|
2014-04-27 18:42:55 +00:00
|
|
|
# IP
|
|
|
|
alias ipme='wget -qO - icanhazip.com'
|
|
|
|
alias speedtest='wget --output-document=/dev/null http://speedtest.wdc01.softlayer.com/downloads/test500.zip'
|
|
|
|
|
2013-10-28 13:41:02 +00:00
|
|
|
# Bash Prompt
|
|
|
|
PS1="\[\033[35m\]\t\[\033[m\]-\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[31;1m\]\w\[\033[m\]\$ "
|
|
|
|
|
|
|
|
# Export environmental variables
|
|
|
|
export EDITOR=vim
|
2014-04-27 18:48:22 +00:00
|
|
|
export VISUAL=vim
|
2014-04-24 18:52:00 +00:00
|
|
|
export BROWSER=firefox
|
2013-10-28 13:41:02 +00:00
|
|
|
|
|
|
|
# Source external file
|
2014-04-25 16:36:26 +00:00
|
|
|
if [[ -f ~/.customrc ]]; then
|
2024-04-11 19:25:48 +00:00
|
|
|
. ~/.customrc
|
2014-05-22 02:56:32 +00:00
|
|
|
fi
|
2014-09-11 20:15:12 +00:00
|
|
|
|
2016-09-30 04:33:22 +00:00
|
|
|
bash ~/.motd
|