Skip to content

Instantly share code, notes, and snippets.

@jbr
Last active April 10, 2023 17:30
Show Gist options
  • Save jbr/df488c9e092d94e1c144191222e8734d to your computer and use it in GitHub Desktop.
Save jbr/df488c9e092d94e1c144191222e8734d to your computer and use it in GitHub Desktop.
exec shell path from nushell/nu for emacs
(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