summaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-10-30 14:30:25 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-10-30 14:30:45 -0700
commit06c1b996d0f4809c9c1d03fe408f9f1be0eb3c64 (patch)
tree41c64ad97b3b550d341ea3187d1f186f6ad5f32a /.bashrc
parentd1fbe5a3ea5412b224faf5a3b8093703db52fedc (diff)
downloaddotfiles-06c1b996d0f4809c9c1d03fe408f9f1be0eb3c64.tar.gz
add upenv and update-emacs-daemon-environment
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc11
1 files changed, 11 insertions, 0 deletions
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