-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bash_aliases
77 lines (63 loc) · 2.16 KB
/
.bash_aliases
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
# """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
# " Original: Lucy Park (http://lucypark.kr - 525600min@gmail.com, https://github.com/e9t/dotfiles)
# " Modifier: Andrew Lee (y9yk@gmail.com)
# """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
# Change when necessary
export HOME="$HOME"
export PATH="$PATH:$HOME/bin"
# Import constants
if [ -f ~/.bash_constants ]; then
. ~/.bash_constants
fi
# ----------------------------------------------------------------------------
# Environment variables
# ----------------------------------------------------------------------------
# Set locales
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export PYTHONIOENCODING=UTF-8 # http://stackoverflow.com/a/6361471/1054939
# Tell 'ls' to be colorful
export CLICOLOR=1
export LSCOLORS='GxFxCxDxBxegedabagacedx'
# Linker library
export LD_LIBRARY_PATH='/usr/local/lib'
# ----------------------------------------------------------------------------
# Aliases
# ----------------------------------------------------------------------------
# global
alias sourceb='source ~/.bashrc'
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias vi="vim -p -N -n -i NONE -u '$HOME/.vimrc'"
alias tl='tree -L 2'
# tmux
alias tm='tmux'
# pyenv
# export PYENV_ROOT="$HOME/.pyenv"
# export PATH="$PYENV_ROOT/bin:$PATH"
# eval "$(pyenv init - --no-rehash)"
# eval "$(pyenv virtualenv-init -)"
# ----------------------------------------------------------------------------
# Misc
# ----------------------------------------------------------------------------
# bash history logging
if [ -d "$HOME/.logs" ]; then
export HISTCONTROL=ignoredups:erasedups
shopt -s histappend
export PROMPT_COMMAND='if [ "$(id -u)" -ne 0 ]; then echo "$(date "+%Y-%m-%d.%H:%M:%S") $(pwd) $(history 1)" >> ~/.logs/bash-history-$(date "+%Y-%m-%d").log; fi'
fi
# os specific
if [ "$(uname)" == "Darwin" ]; then
if [ -f "$HOME/.bash_macosx" ]; then
. $HOME/.bash_macosx
fi
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
if [ -f "$HOME/.bash_linux" ]; then
. $HOME/.bash_linux
fi
fi
# local bash
if [ -f "$HOME/.bash_local" ]; then
. $HOME/.bash_local
fi