-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy path.profile
More file actions
101 lines (78 loc) · 2.81 KB
/
.profile
File metadata and controls
101 lines (78 loc) · 2.81 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Initialize homebrew
eval $(/opt/homebrew/bin/brew shellenv)
# 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 --path)"
fi
# Additional PATH configuration
## My own scripts - take priority
export PATH="$HOME/bin:$PATH"
## /usr/local/bin - apps like aws, code, cursor use this:
export PATH="/usr/local/bin:$PATH"
## Xcode tools
export PATH="$PATH:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin"
## Need to point @just-every/code to codex explicitly with:
export CODEX_HOME="$HOME/.codex"
# As of 3/12/2024, postgresql@16 is keg-only, so add it to the path
export PATH="/opt/homebrew/opt/postgresql@16/bin:$PATH"
# Force iCloud Drive to download any dotfiles that have been evicted by the
# "Optimize Storage" option being enabled
# macOS 14.0 public beta 3 breaks this
# force-local-icloud-dotfiles
# Shell-specific settings
if [[ "$SHELL" == *zsh ]]; then
# Nothing to see here
true
elif [[ "$SHELL" == *bash ]]; then
## Bash settings
### stickier .bash_history
export HISTCONTROL=ignoredups:erasedups # no duplicate entries
export HISTSIZE=100000 # big big history
export HISTFILESIZE=100000 # big big history
shopt -s histappend # append to history, don't overwrite it
### Set up homebrew
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="code-stable --wait"
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 --ignore --hidden --follow --glob "!.git/*"'
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
## Increase limit of open file descriptors because watch processes
ulimit -n 10000
## load custom PS1 prompt
source $HOME/bin/ps1
## Enable Homebrew bash completions (interactive shells only)
# https://docs.brew.sh/Shell-Completion
if [[ $- == *i* ]]; then
if type brew &>/dev/null
then
HOMEBREW_PREFIX="$(brew --prefix)"
if [[ -r "${HOMEBREW_PREFIX}/etc/profile.d/bash_completion.sh" ]]
then
source "${HOMEBREW_PREFIX}/etc/profile.d/bash_completion.sh"
else
for COMPLETION in "${HOMEBREW_PREFIX}/etc/bash_completion.d/"*
do
[[ -r "${COMPLETION}" ]] && source "${COMPLETION}"
done
fi
fi
# Custom bash completion for my ~/bin/edit script
source "$HOME/icloud-drive/dotfiles/bash-completions/edit.bash"
fi
PATH="$PATH:$HOME/.local/bin"