-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bash_profile
81 lines (65 loc) · 1.72 KB
/
.bash_profile
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
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
# Path Settings
#------------------
# rbenv
if [ -d ~/.rbenv ]; then
export PATH=$HOME/.rbenv/bin:$PATH
eval "$(rbenv init -)"
source ~/.rbenv/completions/rbenv.bash
fi
# postgresql
export PGDATA=/usr/local/var/postgres
# git
source ~/bin/git-completion.bash
# Shell Options
#------------------
export LANGUAGE='ja_JP.UTF-8'
export LANG='ja_JP.UTF-8'
export LC_ALL='ja_JP.UTF-8'
export PAGER='less -Ou8'
export EDITOR='vim'
# ls colors
export CLICOLOR=1
export LSCOLORS=DxGxcxdxCxegedabagacad
# source-highlight
export LESS='-R'
export LESSOPEN='| /usr/local/bin/src-hilite-lesspipe.sh %s'
# Don't put duplicate lines in the history.
export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
# shopt -s nocaseglob # Use case-insensitive filename globbing
# shopt -s histappend
shopt -s cdspell
shopt -s dotglob
# prompt
export PS1="\[\e[1;36m\]\u@\h: \[\e[0;37m\]\W\\$ \[\e[00m\]"
# Aliases
#------------------
# Interactive operation...
alias rm='rm -i'
# alias cp='cp -i'
# alias mv='mv -i'
# File systems
alias df='df -h'
alias du1='du -h -d1'
alias du='du -h'
alias l='ls'
alias ll='ls -aCFlh'
alias ls='ls -ACF'
# DBs
alias my="mysql"
alias my_="mysql --pager='less -S'"
alias my-restart='mysql.server restart'
alias pg-start='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start'
alias pg-stop='pg_ctl -D /usr/local/var/postgres stop -s -m fast'
# Misc :)
alias src='source ~/.bash_profile'
alias grep='grep --color=auto' # show differences in colour
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias whence='type -a' # where, of a sort
alias vi='vim'
alias be='bundle exec'
alias ni='~/bin/nicorepo/bin/nicorepo i'
alias s='subl'