purcell / exec-path-from-shell

Make Emacs use the $PATH set up by the user's shell
Other
1.43k stars 82 forks source link

Add Nushell support #119

Closed purcell closed 7 months ago

purcell commented 7 months ago

See #109.

Currently a bit of a messy addition, but good enough to try out. Works by asking nu to print the relevant env vars as JSON, then Emacs parses the result. This is actually cleaner than the printf approach. Certain vars (e.g. PATH) are arrays inside nu, so we artificially join them back into a single string with path-separator (usually :) so that the result lines up with that from other shells.

KaranAhlawat commented 7 months ago

I didn't know how else to leave a comment at the correct line, so I may have started a review...sorry about that. But yes, as the comment says, everything works after we pass in the shell as the argument to the exec-path-from-shell--nushell-p function.

purcell commented 7 months ago

(P.S. the way to create a plain comment is to click the other button: the default green one is labelled "Start a review", the other says "Comment". I make this mistake all the time myself.)