Skip to content

Instantly share code, notes, and snippets.

@philjackson
Created June 17, 2015 14:05
Show Gist options
  • Save philjackson/ca0fa6f6dc710b2042ee to your computer and use it in GitHub Desktop.
Save philjackson/ca0fa6f6dc710b2042ee to your computer and use it in GitHub Desktop.
function export-emacs {
if [ "$(emacsclient -e t)" != 't' ]; then
return 1
fi
for name in "${@}"; do
value=$(eval echo \"\$${name}\")
emacsclient -e "(setenv \"${name}\" \"${value}\")" >/dev/null
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment