-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.bashrc
More file actions
86 lines (79 loc) · 2.52 KB
/
.bashrc
File metadata and controls
86 lines (79 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# options
shopt -s autocd
shopt -s cdspell
shopt -s checkwinsize
shopt -s dirspell
shopt -s histappend
shopt -s no_empty_cmd_completion
shopt -s nocaseglob
# envs
export HISTSIZE=-1
export HISTFILESIZE=-1
export HISTCONTROL=ignoreboth
infocmp xterm-256color >/dev/null 2>&1 && export TERM="xterm-256color"
[ -f $HOME/.bash_prompt ] && source $HOME/.bash_prompt || export PS1="\[\033[38;5;33m\]\u\[\033[0m\] at \[\033[38;5;37m\]\h\[\033[0m\] in \[\e[1;32m\]\w\[\033[0m\]\n$ "
export EDITOR=vim
export PAGER='less -I'
export VISUAL=vim
export WORKON_HOME="$HOME/.local/share/venv"
export PROJECT_HOME="$HOME/.local/share/venv_projects"
export VIRTUALENVWRAPPER_VIRTUALENV=${HOME}/.local/bin/virtualenv
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
export GCM_CREDENTIAL_STORE=cache
export GOPATH="$HOME/.local/share/go"
export BAT_THEME="Dracula"
# aliases
alias ls='ls --color=auto'
alias ll='ls --color=auto -lhF'
alias diff='diff --color=auto'
alias gd='git diff --color-moved'
alias grep='grep --color=auto'
alias ip='ip -color=auto'
alias notes="$EDITOR $HOME/.local/share/notes.txt"
alias svnlog='svn log --limit=10'
alias svngrep="svn log | grep -A1 -B2 $@"
alias cal='cal -w'
alias shrug="echo '¯\_(ツ)_/¯'"
alias vaultd="ansible-vault decrypt --output=-" # Set ANSIBLE_VAULT_PASSWORD_FILE env
alias apt-update-verbose="sudo apt -o'Debug::pkgAcquire::Worker=1' update"
alias bat="batcat -pp"
alias gp="git pull --ff"
alias gs="git status --verbose"
alias gl="git log --stat --abbrev-commit"
alias ldapsearch="ldapsearch -o ldif-wrap=no"
alias tssh="tsocks ssh"
# functions
bathelp() {
"$@" --help 2>&1 | bat --paging=never --plain --language=help
}
# bash-completion
if [ -f /usr/share/bash-completion/bash_completion ]; then
source /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
source /etc/bash_completion
elif [ -f /usr/local/etc/bash_completion ]; then
source /usr/local/etc/bash_completion
elif [ -f ~/.bash_completion ]; then
source ~/.bash_completion
fi
# ssh-agent
if [ -f ~/.ssh/agent.env ] ; then
source ~/.ssh/agent.env > /dev/null
if ! kill -0 $SSH_AGENT_PID > /dev/null 2>&1; then
echo "Stale agent file found. Spawning a new agent."
eval $(ssh-agent | tee ~/.ssh/agent.env)
ssh-add
fi
else
echo "Starting ssh-agent"
eval $(ssh-agent | tee ~/.ssh/agent.env)
ssh-add
fi
# source local modifications
if [ -f ~/.bash_local ]; then
source ~/.bash_local
fi
# source virtualenvwrapper.sh
if [ -f ${HOME}/.local/bin/virtualenvwrapper.sh ]; then
source ${HOME}/.local/bin/virtualenvwrapper.sh
fi