From 5083b704665e28b338647f54d40de3598e5413f5 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Thu, 11 Nov 2021 12:36:58 -0700 Subject: Add functions script with tmux refresh. --- 05-functions.zsh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 05-functions.zsh (limited to '05-functions.zsh') diff --git a/05-functions.zsh b/05-functions.zsh new file mode 100644 index 0000000..d69acf3 --- /dev/null +++ b/05-functions.zsh @@ -0,0 +1,10 @@ +if [ -n '$TMUX' ]; then + function refresh { + export SSH_AUTH_SOCK="$(tmux show-environment | grep '^SSH_AUTH_SOCK' | cut -d '=' -f 2)" + export SSH_AUTH_KEY="$(tmux show-environment | grep '^SSH_AUTH_KEY' | cut -d '=' -f 2)" + export SSH_CONNECTION="$(tmux show-environment | grep '^SSH_CONNECTION' | cut -d '=' -f 2)" + export DISPLAY="$(tmux show-environment | grep '^DISPLAY' | cut -d '=' -f 2)" + } +else + function refresh { } +fi -- cgit