forked from searls/icloud-dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.profile
67 lines (49 loc) · 1.52 KB
/
.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
# Initialize my "xenv" language runtime managers if installed
if command -v rbenv &>/dev/null; then
eval "$(rbenv init -)"
fi
if command -v nodenv &>/dev/null; then
eval "$(nodenv init -)"
fi
if command -v pyenv &>/dev/null; then
eval "$(pyenv init -)"
fi
# Additional PATH configuration
## My own scripts
export PATH="$HOME/bin:$PATH"
## Ruby binstubs (note: this can be exploited at untrusted working directories!)
export PATH="$PATH:./bin"
## homebrew sbin
export PATH="/usr/local/sbin:$PATH"
# Shell-specific settings
if [[ "$SHELL" == *zsh ]]; then
# Nothing to see here
true
elif [[ "$SHELL" == *bash ]]; then
## Bash settings
### stickier .bash_history
shopt -s histappend
### Set up tab-completion (requires `brew install bash-completion`)
if [ -f $(brew --prefix)/etc/bash_completion ]; then
source $(brew --prefix)/etc/bash_completion
fi
fi
# Other Customization
## Editor registration for git, etc
export EDITOR="vim"
export LC_CTYPE="en_US.UTF-8"
## Reference the location of iCloud Drive
export ICLOUD_DRIVE="$HOME/icloud-drive"
## Source ENV variables
source "$ICLOUD_DRIVE/dotfiles/.env"
## Set fzf to use rg like so for ctrl-t in shell:
export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"'
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
## Increase limit of open file descriptors because watch processes
ulimit -n 10000
## Set a few aliases
alias be="bundle exec"
alias gc="git commit"
## load custom PS1 prompt
source $HOME/bin/ps1
export PATH="$HOME/.cargo/bin:$PATH"