-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshenv.sh
50 lines (39 loc) · 926 Bytes
/
.zshenv.sh
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
#!/bin/sh
# set language
if [[ -z "$LANG" ]]; then
eval "$(locale)"
fi
# neovim python virtual environment
[ ! -d ~/.virtualenvs/neovim ] && python -m ~/.virtualenvs/neovim
# set editors
export VISUAL=vim
export EDITOR="$VISUAL"
export PAGER='less'
# set default less options
export LESS='-F -g -i -M -R -S -w -X -z-4'
# set less preprocessor
if (( $+commands[lesspipe.sh] )); then
export LESSOPEN='| /usr/bin/env lesspipe.sh %s 2>&-'
fi
# common dirs
dev="$HOME/Codes"
# set the list of dirs that zsh searches for programs
path=(
/usr/local/{bin,sbin}
/usr/{bin,sbin}
/{bin,sbin}
$path
)
for path_file in /etc/paths.d/*(.N); do
path+=($(<$path_file))
done
unset path_file
# temp files
if [[ -d "$TMPDIR" ]]; then
export TMPPREFIX="${TMPDIR%/}/zsh"
if [[ ! -d "$TMPPREFIX" ]]; then
mkdir -p "$TMPPREFIX"
fi
fi
# misc program exports
source $HOME/dotfiles/shell/exports