-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathzshenv
39 lines (29 loc) · 1.08 KB
/
zshenv
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
_source_if_available() { [ -e "$1" ] && source "$1" }
_append_to_path_if_available() { [ -e "$1" ] && PATH="$PATH:$1" }
_prepend_to_path_if_available() { [ -e "$1" ] && PATH="$1:$PATH" }
_add_to_path_if_available() { _append_to_path_if_available "$1" }
LANG="en_US.UTF-8"
_prepend_to_path_if_available "$HOME/.bin"
_prepend_to_path_if_available "$HOME/.fzf/bin"
_prepend_to_path_if_available "$HOME/.nix-profile/bin"
_append_to_path_if_available "/usr/local/bin"
_append_to_path_if_available "/usr/sbin"
_append_to_path_if_available "/run/current-system/sw/bin"
_append_to_path_if_available "/Applications/Ghostty.app/Contents/MacOS"
typeset -U PATH
export PATH
CDPATH="$CDPATH:$HOME/src:$HOME/src/git.sr.ht:$HOME/src/github.com"
typeset -U CDPATH
export CDPATH
if command -v nvim > /dev/null 2>&1; then
export VISUAL="nvim"
else
export VISUAL="vim"
fi
export EDITOR="$VISUAL"
if command -v rg > /dev/null 2>&1; then
export FZF_DEFAULT_COMMAND="rg --files"
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
fi
export FZF_DEFAULT_OPTS="--color=bw"
_source_if_available "$HOME/.zshenv.local"