diff options
author | Josh Rahm <rahm@google.com> | 2021-11-11 12:36:58 -0700 |
---|---|---|
committer | Josh Rahm <rahm@google.com> | 2021-11-11 12:36:58 -0700 |
commit | 5083b704665e28b338647f54d40de3598e5413f5 (patch) | |
tree | 4615cc8ac7c1dbee4a62a47a76b3b53c21f907e5 | |
parent | 62d7881f27857401e868b2d19d4af9cb00ea4661 (diff) | |
download | zshrcd-5083b704665e28b338647f54d40de3598e5413f5.tar.gz zshrcd-5083b704665e28b338647f54d40de3598e5413f5.tar.bz2 zshrcd-5083b704665e28b338647f54d40de3598e5413f5.zip |
Add functions script with tmux refresh.
-rw-r--r-- | 05-functions.zsh | 10 |
1 files changed, 10 insertions, 0 deletions
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 |