1 ### exports for new non-interactive shell
5 export LANG="en_US.UTF-8"
6 export LC_CTYPE="$LANG"
9 # /usr/{pkg,local,games} are unix/bsdisms
11 path=({~/,/,/usr/}sbin {~/,/,/usr/}bin /usr/pkg/{s,}bin /usr/X11R{7,6}/bin
12 /usr/local/{s,}bin /usr/games "${path[@]}")
14 typeset -U _sev_backup_path
15 _sev_backup_path=("${path[@]}")
16 typeset -U FPATH fpath
17 fpath=(${ZDOTDIR:-$HOME/.zsh}/functions/{*,Completions/*}(N) "${fpath[@]}")
21 export XDG_CONFIG_HOME=~/etc
22 export XDG_CONFIG_DIRS=~/.config:/usr/pkg/etc/xdg:/usr/local/etc/xdg:/etc/xdg
23 export XDG_DATA_HOME=~/share
24 export XDG_DATA_DIRS=~/.local/share:/usr/pkg/share:/usr/local/share:/usr/share
25 export XDG_CACHE_HOME=~/tmp
26 export XDG_RUNTIME_DIR=~/tmp
29 t="${TMPDIR:-/tmp}/home-$LOGNAME"
32 mkdir -m 700 "$t" > /dev/null 2>&1
33 # TODO: check if dir exists after mkdir
35 # allow opaque entries to override link creation
37 ln -sf "$t" "$h" > /dev/null 2>&1
42 ### gpg ssh forwarding
43 # these env vars are used as arguments to RemoteForward in ~/.ssh/config
44 if [[ -v commands[gpgconf] && ! ( -v _GNUPG_SOCK_SRC && -v _GNUPG_SOCK_DEST ) ]] {
45 # if already connected over SSH, reuse forwarded socket for future
46 # connections; else use extra socket
47 sock=${SSH_CLIENT:+agent-socket}
48 export _GNUPG_SOCK_SRC=$(gpgconf --list-dirs ${sock:-agent-extra-socket})
49 # XXX: chance of race condition
50 export _GNUPG_SOCK_DEST=/tmp/.gpg-agent-forward
54 ### load site-specific
55 if [[ -f ~/.zshenv.local ]] { source ~/.zshenv.local }
57 # vim: set et sts=4 sw=4 ts=8 tw=79 :