-
Notifications
You must be signed in to change notification settings - Fork 0
/
envs
executable file
·84 lines (58 loc) · 1.73 KB
/
envs
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
#!/bin/bash
# {{{ env
# fix mac LC_CTYPE issue
# see: http://sourabhbajaj.com/python/2014/03/31/fix-valueerror-unknown-locale-utf-8/
if [[ "$LC_CTYPE" == 'UTF-8' ]]; then
export LC_CTYPE="en_US.UTF-8"
fi
export TMPDIR='/tmp'
export EDITOR=nvim
if [[ -n ${NVIM} ]] && command -v nvr >/dev/null ; then
export EDITOR="nvr -cc split --remote-wait"
fi
if [[ "${TERM_PROGRAM}" == "vscode" ]] ; then
export EDITOR="code --wait"
fi
export GIT_EDITOR="${EDITOR}"
export PATH=$HOME/.local/bin:$PATH
export MANPATH="$HOME/.local/man:$MANPATH"
# For MacPorts
[[ -d /opt/local/bin ]] && export PATH=/opt/local/bin:/opt/local/sbin:$PATH && export MANPATH=/opt/local/share/man:$MANPATH
[[ -d /opt/local/libexec/gnubin ]] && export PATH="/opt/local/libexec/gnubin:${PATH}" &&
# }}}
# {{{ env: go
export GOTMPDIR=$HOME/src/go/tmp
export GOCACHE=$HOME/src/go/cache
export GOPATH=$HOME/src/go
export GOBIN="${HOME}/.local/bin"
export PATH=${GOBIN}:$PATH
# }}}
#
# {{{ env: node + pnpm
export PNPM_HOME="${HOME}/.local/lib/pnpm/bin"
[[ -d "${PNPM_HOME}" ]] && export PATH=${PNPM_HOME}:$PATH
# }}}
# {{{ env: fzf
export FZF_DEFAULT_COMMAND='ag --hidden --ignore .git -g ""'
export FZF_DEFAULT_OPTS='--height=100%'
# }}}
# {{{ env: LastPass
export LPASS_AGENT_TIMEOUT=0
# }}}
# {{{ prompt
if ! command -v starship >/dev/null ; then
echo "${0}: Error: starship command not found" >&2
else
eval "$(starship init zsh)"
__pre_echo_blank_init=0
function pre_echo_blank() {
[ "${__pre_echo_blank_init}" -eq 0 ] && __pre_echo_blank_init=1 && return
echo
}
function pre_set_win_title(){
echo -ne "\033]0;${PWD/${HOME}/"~"}\007"
}
precmd_functions+=(pre_echo_blank pre_set_win_title)
fi
# }}}
# vim: fdm=marker