Updated and cleaned bashrc

This commit is contained in:
Amarpreet Minhas 2014-04-27 14:42:55 -04:00
parent f3ee609a51
commit 06f84493af

36
bashrc
View file

@ -7,20 +7,33 @@ if [[ $- != *i* ]] ; then
return return
fi fi
### HISTORY OPTIONS ###
# Ignore duplicate commands and commands starting with a space for Bash history # Ignore duplicate commands and commands starting with a space for Bash history
HISTCONTROL=ignoredups:ignorespace HISTCONTROL=ignoredups:ignorespace
# append to the history file, don't overwrite it
shopt -s histappend
# Bash History file size # Bash History file size
HISTSIZE=1000 HISTSIZE=1000
HISTFILESIZE=2000 HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS. ### SHELL OPTIONS ###
# fix text wrap based on windows size
shopt -s checkwinsize shopt -s checkwinsize
# 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
### ALIASES ###
# enable color support of ls and also add handy aliases # enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
@ -38,6 +51,13 @@ alias ll='ls -alF'
alias la='ls -A' alias la='ls -A'
alias l='ls -CF' alias l='ls -CF'
# IP
alias ipme='wget -qO - icanhazip.com'
alias speedtest='wget --output-document=/dev/null http://speedtest.wdc01.softlayer.com/downloads/test500.zip'
alias netlist='lsof -i -nP'
### SHELL SETTINGS ###
# Bash Prompt # Bash Prompt
PS1="\[\033[35m\]\t\[\033[m\]-\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[31;1m\]\w\[\033[m\]\$ " PS1="\[\033[35m\]\t\[\033[m\]-\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[31;1m\]\w\[\033[m\]\$ "
@ -47,11 +67,7 @@ export EDITOR=vim
export BROWSER=firefox export BROWSER=firefox
# IP ### FUNCTIONS ###
alias ipme='wget -qO - icanhazip.com'
alias speedtest='wget --output-document=/dev/null http://speedtest.wdc01.softlayer.com/downloads/test500.zip'
alias netlist='lsof -i -nP'
# Easy Extract # Easy Extract
extract () { extract () {