Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 121 lines (98 sloc) 3.299 kb
c16f5ee Jeremy Stashewsky initial commit
authored
1 # ~/.bashrc: executed by bash(1) for non-login shells.
2 # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
3 # for examples
4
5 # If not running interactively, don't do anything
6 [ -z "$PS1" ] && return
7
6ad5889 Jeremy Stashewsky set -o vi; dunno why I neglected this
authored
8 # vi line editing mode
9 set -o vi
10
c16f5ee Jeremy Stashewsky initial commit
authored
11 # don't put duplicate lines in the history. See bash(1) for more options
12 # ... or force ignoredups and ignorespace
13 HISTCONTROL=ignoredups:ignorespace
14
15 # append to the history file, don't overwrite it
16 shopt -s histappend
17
18 # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
19 HISTSIZE=1000
20 HISTFILESIZE=2000
6d122f1 Jeremy Stashewsky HISTIGNORE
authored
21 HISTIGNORE="&:[bf]g:jobs:exit"
c16f5ee Jeremy Stashewsky initial commit
authored
22
23 # check the window size after each command and, if necessary,
24 # update the values of LINES and COLUMNS.
25 shopt -s checkwinsize
26
27 # make less more friendly for non-text input files, see lesspipe(1)
2050c16 Jeremy Stashewsky `which` is noisy on centos
authored
28 if which lesspipe >/dev/null 2>&1; then
c16f5ee Jeremy Stashewsky initial commit
authored
29 eval "$(SHELL=/bin/sh lesspipe)"
30 fi
31
b7c2dd7 Jeremy Stashewsky Full dircolors support with homebrew coreutils
authored
32 # Enable color support of ls
c4b34fe Jeremy Stashewsky enable ls colors on OSX
authored
33 if [ `uname` == 'Darwin' ]; then
34 export CLICOLOR=1
b7c2dd7 Jeremy Stashewsky Full dircolors support with homebrew coreutils
authored
35 if [ -x /usr/local/bin/gls ]; then
36 # brew install coreutils to get gls
37 alias ls='/usr/local/bin/gls --color=auto'
c4b34fe Jeremy Stashewsky enable ls colors on OSX
authored
38 fi
b7c2dd7 Jeremy Stashewsky Full dircolors support with homebrew coreutils
authored
39 else
40 alias ls='ls --color=auto'
c16f5ee Jeremy Stashewsky initial commit
authored
41 fi
42
b7c2dd7 Jeremy Stashewsky Full dircolors support with homebrew coreutils
authored
43 # read in .dircolors or just use the default
2050c16 Jeremy Stashewsky `which` is noisy on centos
authored
44 if which gdircolors >/dev/null 2>&1; then
b7c2dd7 Jeremy Stashewsky Full dircolors support with homebrew coreutils
authored
45 test -r ~/.dircolors && eval "$(gdircolors -b ~/.dircolors)" || eval "$(gdircolors -b)"
2050c16 Jeremy Stashewsky `which` is noisy on centos
authored
46 elif which dircolors >/dev/null 2>&1; then
b7c2dd7 Jeremy Stashewsky Full dircolors support with homebrew coreutils
authored
47 test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
48 fi
49
50 # colorful grep too (but I use `ack` ususally)
51 alias grep='grep --color=auto'
52 alias fgrep='fgrep --color=auto'
53 alias egrep='egrep --color=auto'
54
c16f5ee Jeremy Stashewsky initial commit
authored
55 # Alias definitions.
56 # You may want to put all your additions into a separate file like
57 # ~/.bash_aliases, instead of adding them here directly.
58 # See /usr/share/doc/bash-doc/examples in the bash-doc package.
59
60 if [ -f ~/.bash_aliases ]; then
61 . ~/.bash_aliases
62 fi
63
64 # enable programmable completion features (you don't need to enable
65 # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
66 # sources /etc/bash.bashrc).
67 if [ -f /opt/local/etc/bash_completion ] && ! shopt -oq posix; then
68 . /opt/local/etc/bash_completion
69 elif [ -f /etc/bash_completion ] && ! shopt -oq posix; then
70 . /etc/bash_completion
71 fi
72
163ace6 Jeremy Stashewsky Misc Updates, 2014-03-25
authored
73 if [ `uname` == "Darwin" ]; then
74 # homebrew bash completion
75 if [ -f `brew --prefix`/etc/bash_completion ]; then
76 . `brew --prefix`/etc/bash_completion
77 fi
78 fi
79
80 # after homebrew so the custom prompt applies
81 if [ "$USER" != "vagrant" ]; then
82 . .bash_git_prompt
83 PROMPT_COMMAND=_git_prompt_color
84 fi
f847fc9 Jeremy Stashewsky gpu and gunpushed commands (inspired by old ST equivs)
authored
85 . .bash_git_cmd
c16f5ee Jeremy Stashewsky initial commit
authored
86
1a5c015 Jeremy Stashewsky Prepend /usr/local/bin to PATH on Darwin
authored
87 if [ `uname` == "Darwin" ]; then
e93788e Jeremy Stashewsky Set ulimit -n 1024 on Darwin
authored
88 export PATH=/usr/local/sbin:/usr/local/bin:$PATH
89 ulimit -n 1024
1a5c015 Jeremy Stashewsky Prepend /usr/local/bin to PATH on Darwin
authored
90 fi
c9675d3 Jeremy Stashewsky Adjust path for local node and gcc44 on oldcloud
authored
91
92 if [ `uname` == "SunOS" ]; then
93 if [ -d /opt/local/share/lib/terminfo ]; then
94 export TERMINFO=/opt/local/share/lib/terminfo
95 fi
96 fi
97
98 if [ `uname -n` == 'snv_121' ]; then
3bb57a6 Jeremy Stashewsky Fix man and PATH on smartos
authored
99 alias man='GROFF_NO_SGR= TCAT="less -s" TROFF="groff -Tascii" man -t'
c9675d3 Jeremy Stashewsky Adjust path for local node and gcc44 on oldcloud
authored
100 export PATH=/opt/local/gcc44/bin:$PATH
101 fi
3bb57a6 Jeremy Stashewsky Fix man and PATH on smartos
authored
102
103 if [ `uname` == "SunOS" ]; then
e93788e Jeremy Stashewsky Set ulimit -n 1024 on Darwin
authored
104 export PATH=$PATH:/usr/local/bin
3bb57a6 Jeremy Stashewsky Fix man and PATH on smartos
authored
105 fi
5b6b9e7 Jeremy Stashewsky use nvm by default
authored
106
163ace6 Jeremy Stashewsky Misc Updates, 2014-03-25
authored
107 # Node Version Manager
5b6b9e7 Jeremy Stashewsky use nvm by default
authored
108 if [ -e ~/.nvm/nvm.sh ]; then
e93788e Jeremy Stashewsky Set ulimit -n 1024 on Darwin
authored
109 . ~/.nvm/nvm.sh
110 nvm use default > /dev/null
5b6b9e7 Jeremy Stashewsky use nvm by default
authored
111 fi
b03594d Jeremy Stashewsky Source .bashrc.local if available
authored
112
163ace6 Jeremy Stashewsky Misc Updates, 2014-03-25
authored
113 # Go Version Manager
114 if [ -e ~/.gvm/scripts/gvm ]; then
115 . ~/.gvm/scripts/gvm
116 fi
117
b03594d Jeremy Stashewsky Source .bashrc.local if available
authored
118 if [ -e ~/.bashrc.local ]; then
119 . ~/.bashrc.local
120 fi
Something went wrong with that request. Please try again.