Last active
April 10, 2023 17:30
-
-
Save jbr/df488c9e092d94e1c144191222e8734d to your computer and use it in GitHub Desktop.
exec shell path from nushell/nu for emacs
This file contains hidden or 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
(defun set-exec-path-from-nu () | |
(interactive) | |
(let ((path-from-shell (shell-command-to-string | |
"~/.cargo/bin/nu -i -l -c\ | |
\"source ~/.config/env.nu; \ | |
echo $env.PATH | str join :\""))) | |
(setenv "PATH" path-from-shell) | |
(setq exec-path (split-string path-from-shell ":")))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment