aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge <david.runge@native-instruments.de>2018-04-19 09:58:14 +0200
committerDavid Runge <david.runge@native-instruments.de>2018-04-19 09:58:14 +0200
commite9388c8808079d5b94a8624c6d1418f9b7642b0b (patch)
tree26fd285e11875bc7769add02f552f7de17eb1f64
parent495cc1d5d180de906219e0373a351d1996176bf2 (diff)
downloaddotfiles-e9388c8808079d5b94a8624c6d1418f9b7642b0b.tar.gz
dotfiles-e9388c8808079d5b94a8624c6d1418f9b7642b0b.tar.bz2
dotfiles-e9388c8808079d5b94a8624c6d1418f9b7642b0b.tar.xz
dotfiles-e9388c8808079d5b94a8624c6d1418f9b7642b0b.zip
.zsh.after/export.zsh: Not exporting SSH_AUTH_SOCK for root and when on macOS. Explicitely pointing TMUX_TMPDIR to /tmp on macOS.
-rw-r--r--.zsh.after/export.zsh6
1 files changed, 5 insertions, 1 deletions
diff --git a/.zsh.after/export.zsh b/.zsh.after/export.zsh
index e0bdf6d..921401d 100644
--- a/.zsh.after/export.zsh
+++ b/.zsh.after/export.zsh
@@ -55,11 +55,15 @@ export GPG_TTY=$(tty)
export GPG_AGENT_INFO=""
# ssh-agent
-export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
+if [[ $UID -ne 0 ]] && [[ $VENDOR != "apple" ]];then
+ export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
+fi
# tmux
if [[ $UID -ne 0 ]] && [[ $VENDOR != "apple" ]]; then
export TMUX_TMPDIR="$XDG_RUNTIME_DIR/"
+else
+ export TMUX_TMPDIR="/tmp"
fi
# zsh