76 lines
1.9 KiB
Bash
76 lines
1.9 KiB
Bash
#
|
|
# ~/.bashrc
|
|
#
|
|
|
|
# If not running interactively, don't do anything
|
|
[[ $- != *i* ]] && return
|
|
|
|
CYAN="\[$(tput setaf 4)\]"
|
|
RESET="\[$(tput sgr0)\]"
|
|
|
|
# Set prompts
|
|
PS1="${CYAN}[\u@\h ${RESET}\D{%H:%M}${CYAN} \W]${RESET}\$ "
|
|
PS2="> "
|
|
[ -z "$PS1" ] && return
|
|
|
|
if [[ -n "$DISPLAY" ]] ; then
|
|
[[ -n "$TMUX" ]] && export TERM=screen-256color || export TERM=xterm-256color
|
|
fi
|
|
|
|
export EDITOR="vim"
|
|
export GREP_COLOR="1;33"
|
|
export GOPATH="$HOME/projects/go"
|
|
export HISTCONTROL="ignoredups"
|
|
export PATH="$PATH:$HOME/bin:"
|
|
export WORKON_HOME="~/.virtualenvs"
|
|
|
|
# less colors
|
|
export LESS=-R
|
|
export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink
|
|
export LESS_TERMCAP_md=$'\E[1;36m' # begin bold
|
|
export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink
|
|
export LESS_TERMCAP_so=$'\E[01;44;33m' # begin reverse video
|
|
export LESS_TERMCAP_se=$'\E[0m' # reset reverse video
|
|
export LESS_TERMCAP_ue=$'\E[0m' # reset underline
|
|
export LESS_TERMCAP_us=$'\E[1;32m' # begin underline
|
|
|
|
alias diff="diff --color=auto"
|
|
alias grep="grep --color=auto"
|
|
alias egrep="egrep --color=auto"
|
|
alias gst="git status"
|
|
alias ls="ls --color=auto"
|
|
alias l="ls"
|
|
alias la="ls -a"
|
|
alias ll="ls -l"
|
|
alias lla="ls -la"
|
|
alias mkdir="mkdir -p -v"
|
|
alias restricted-vim="rvim -Zi NONE"
|
|
alias rot13="tr a-zA-Z n-za-mN-ZA-M"
|
|
alias tmux="TERM=screen-256color-bce tmux"
|
|
alias updick='/usr/bin/uptime | perl -ne "/(\d+) d/;print 8,q(=)x\$1,\"D\n\""'
|
|
|
|
if [[ $(command -v dircolors) ]] ; then
|
|
eval $(dircolors -b)
|
|
fi
|
|
|
|
# Arch linux package search
|
|
if [[ $(command -v aura) ]] ; then
|
|
function psearch() {
|
|
aura -Ss $1
|
|
aura -As $1
|
|
}
|
|
fi
|
|
|
|
# Base16 Shell
|
|
BASE16_SHELL="$HOME/.config/base16-shell/scripts/base16-default-dark.sh"
|
|
[[ -s $BASE16_SHELL ]] && source $BASE16_SHELL
|
|
|
|
# Virtualenv wrapper
|
|
[[ -s /usr/bin/virtualenvwrapper.sh ]] && source /usr/bin/virtualenvwrapper.sh
|
|
|
|
# AWS
|
|
[[ -f $HOME/.aws ]] && source "$HOME/.aws"
|
|
|
|
shopt -s autocd
|
|
shopt -s checkwinsize
|