-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.utilities
37 lines (30 loc) · 962 Bytes
/
.utilities
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
# Homebrew setup
if [[ -f "/opt/homebrew/bin/brew" ]]; then
HOMEBREW_PREFIX="/opt/homebrew"
elif [[ -f "/usr/local/bin/brew" ]]; then
HOMEBREW_PREFIX="/usr/local"
else
echo "Homebrew not found"
fi
[[ -n "$HOMEBREW_PREFIX" ]] && eval "$(${HOMEBREW_PREFIX}/bin/brew shellenv)"
# asdf
if (( $+commands[asdf] )); then
# Source asdf
. "${ASDF_DATA_DIR:-$HOME/.asdf}/asdf.sh"
# Create completions directory if it doesn't exist
if [[ ! -d "${ASDF_DATA_DIR:-$HOME/.asdf}/completions" ]]; then
mkdir -p "${ASDF_DATA_DIR:-$HOME/.asdf}/completions"
asdf completion zsh > "${ASDF_DATA_DIR:-$HOME/.asdf}/completions/_asdf"
fi
fi
# Tool initialization
if command -v starship >/dev/null 2>&1; then
eval "$(starship init zsh)"
fi
if command -v direnv >/dev/null 2>&1; then
eval "$(direnv hook zsh)"
fi
if command -v zoxide >/dev/null 2>&1; then
eval "$(zoxide init zsh)"
fi
# Rest of your utilities file...