forked from Khan/khan-dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc.khan
28 lines (23 loc) · 1.1 KB
/
.bashrc.khan
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
################################################################################
# Khan Academy specific bashrc
# Add Phabricator bins to PATH
export PATH="$HOME/khan/devtools/arcanist/khan-bin:$PATH"
# Activate Python2.7 virtualenv
source ~/.virtualenv/khan27/bin/activate
# Figure out what directory we're *really* in (following symlinks).
# We need this because *-completion.bash are siblings to this script.
# http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # follow symlinks
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # resolve relative symlink
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
# Enable autocompletion for git and hg
source "$DIR/git-completion.bash"
source "$DIR/hg-completion.bash"
# Set a high limit for open file descriptors per shell.
# The default on OS X is 256; we increase it to 1024--the default value of
# `sysctl kern.maxfilesperproc`, which `ulimit -n` must not exceed.
ulimit -S -n 1024