-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbashrc
More file actions
84 lines (61 loc) · 2.1 KB
/
bashrc
File metadata and controls
84 lines (61 loc) · 2.1 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
#!/bin/bash
source ~/.dotfiles/bashrc_colors
export TERM=xterm
export GREP_OPTIONS='--color=always --exclude=*coverage* --exclude=tags --exclude-dir=.git'
export CLICOLOR=1
# of course ls is different on os x
if [ -f /etc/debian_version ]
then
alias ls='ls --color=auto'
else
alias ls='ls -G'
fi
alias ll='ls -lh'
alias la='ls -lah'
alias less='less -R' # parse control chars as colors
alias ..="cd .."
alias ta='tmux attach -d -t'
# weirdo hack for loading readline instead of libedit http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=608442
alias psql='LD_PRELOAD=/lib/libreadline.so.5 psql'
prompt_color=$COLOR_GREEN
export PATH="~/bin:/sbin:/usr/local/bin:$PATH"
if [ -d "$HOME/Projects/bin/common-onemain-executables" ]; then
export PATH="~/Projects/bin/common-onemain-executables:$PATH"
fi
export SUDO_PS1="\[${COLOR_RED}\]\w\[${COLOR_NC}\]# "
if [[ `uname` =~ 'Darwin' ]]
then
prompt_end='👻 '
else
prompt_end='$'
fi
export PS1="$hostname_display\[$prompt_color\]\w\[${COLOR_NC}\] $prompt_end "
export EDITOR="vim"
export PSQL_EDITOR='vim -c"set syntax=sql"'
export HISTCONTROL=ignoredups
export PROMPT_COMMAND='history -a' # Save Your Bash History Across Tabs And Sessions
shopt -s checkwinsize # After each command, checks the windows size and changes lines and columns
bind "set completion-ignore-case on"
bind "set show-all-if-ambiguous on"
# enable programmable completion features
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
if [ -e "$HOME/.proxy" ]; then
. turn_on_proxy
fi
# https://github.com/zimbatm/direnv
#eval "$(direnv hook bash)"
function lesscsv() { column -s , -n -t "$@" | less -#2 -N -S; }
if [[ -s "$HOME/.dotfiles/secrets" ]]
then
source "$HOME/.dotfiles/secrets"
fi
source "$HOME/.dotfiles/git-completion.bash"
#export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)"
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
# https://github.com/athityakumar/colorls
#source $(dirname $(gem which colorls))/tab_complete.sh
# bash-completion
[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"