Created
October 4, 2019 07:45
-
-
Save TauPan/cb044caf487fee6d4dfae02b9fc11fc5 to your computer and use it in GitHub Desktop.
Tell emacs about (ssh-related) environment variables from your shell, via emacsclient.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
emacsclient_set_env_vars () { | |
for name in $@ | |
do | |
emacsclient -e "(setenv \"$name\" \"$(eval echo \${${name}})\")" | |
done | |
} | |
ssh-copy-ssh-vars-to-emacs () { | |
emacsclient_set_env_vars $(env|grep SSH_|cut -f1 -d=) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment