From 06c1b996d0f4809c9c1d03fe408f9f1be0eb3c64 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 30 Oct 2020 14:30:25 -0700 Subject: add upenv and update-emacs-daemon-environment --- .bashrc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to '.bashrc') diff --git a/.bashrc b/.bashrc index 10b264ba..fdd6683a 100644 --- a/.bashrc +++ b/.bashrc @@ -168,6 +168,17 @@ kill-remote-gpg () { ssh -O exit "$1" } +upenv () { + # don't want to do this outside of tmux as then tmux show-environment will + # show values for the 'default' session which may be irrelevant to us + if [ -n "$TMUX" ]; then + for var in $(tmux show-environment | grep -v "^-"); do + eval "export $var" + done + fi + update-emacs-daemon-environment +} + # build debs from a Linux kernel source tree *without* calling `make clean`. # # The -dbg deb takes some time to build. To get rid of it when it's -- cgit v1.2.3