summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2022-06-13 03:01:02 +0200
committerAlan Pearce2022-06-13 03:01:02 +0200
commit0220e076b784d80125687e5361eb11073e43059d (patch)
tree6e63a6a0d6c7f7d59985102d401599f57c9475b5
parent28703f6e2748c335c90ef0c1dbe6fc6eaae7de8f (diff)
downloadnixfiles-0220e076b784d80125687e5361eb11073e43059d.tar.lz
nixfiles-0220e076b784d80125687e5361eb11073e43059d.tar.zst
nixfiles-0220e076b784d80125687e5361eb11073e43059d.zip
zsh: add helpers to copy/set environment variables in Emacs
-rw-r--r--user/zsh/zshrc8
1 files changed, 8 insertions, 0 deletions
diff --git a/user/zsh/zshrc b/user/zsh/zshrc
index f9f9c984..c63dace2 100644
--- a/user/zsh/zshrc
+++ b/user/zsh/zshrc
@@ -149,3 +149,11 @@ add_project () {
   project=${1:-$PWD}
   emacsclient -e "(projectile-add-known-project \"${project}\")"
 }
+
+esetenv () {
+  emacsclient -e "(setenv \"$1\" \"$2\")"
+}
+
+ecpenv () {
+  esetenv "$1" "${(P)1}"
+}