-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.zshenv
51 lines (44 loc) · 1.25 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
40
41
42
43
44
45
46
47
48
49
50
# .zshenv
#
# From /etc/zsh/zshenv:
#
# This file is sourced on all invocations of the shell. If the -f flag is
# present or if the NO_RCS option is set within this file, all other
# initialization files are skipped.
#
# This file should contain commands to set the command search path, plus other
# important environment variables. This file should not contain commands that
# produce output or assume the shell is attached to a tty.
#
# Local Order: .zshenv, .zprofile, .zshrc, .zlogin
if [ -x "$(command -v nvim)" ]; then
export EDITOR=nvim
export MANPAGER="nvim +Man!"
else
export EDITOR=vim
export MANPAGER="/bin/sh -c \"col -b | vim -c 'set ft=man ts=8 nomod nolist nonu noma' -\""
fi
export ZLE_SPACE_SUFFIX_CHARS=$'&|'
if [ -f $HOME/.ripgreprc ]; then
export RIPGREP_CONFIG_PATH=$HOME/.ripgreprc
fi
# Java
/usr/libexec/java_home 1>/dev/null 2>&1
if [ $? -eq 0 ]; then
export JAVA_HOME=$(/usr/libexec/java_home)
fi
# This won't work because it's already set by lib/misc.zsh
# So I have to do it directly in ~/.zshrc which is not very clean.
# See: oh-my-zsh
#export LESS=-FRSX
# Add custom directories to $PATH
typeset -U path
path=(
~/.local/bin
~/.local/work/bin
~/.npm/bin
~/.rvm/bin
~/.krew/bin
/usr/local/bin
$path
)