Since switching to Nushell I get the following output when calling
"/home/<user>/.emacs.d/bin/doom" sync -e
× Parse mismatch during operation.
1 │ "/home/jkappes/.emacs.d/bin/doom" sync -e
· ╰── expected operator
Comint exited abnormally with code 1 at Fri Nov 3 12:34:54
Can I work around this? Can this be “fixed” within Doom?
What did you expect to happen?
Steps to reproduce
- Install Nushell
chsh to it
Loading data dump...
Hi, I ran into this same issue. The root of the problem is that Nushell doesn’t allow commands to be quoted. Here’s a quick solution I came up with:
(defun doom-reload-fix-bin (orig-fun)
(if (stringp doom-bin)
(setq doom-bin (intern doom-bin)))
(advice-add 'doom/reload :around #'doom-reload-fix-bin)
If you want more details, I wrote up a blog post explaining the issue
Using nushell as a login shell (with
chsh) doesn’t seem like a good idea. I switched to Nushell for daily use a few months ago and so far like it a lot. Unfortunately I had multiple issues with programs that use login shell to run commands (like Doom Emacs does).
The solution I came up with it to use bash as my login shell, and configure tmux to launch nushell. Since I always use tmux, I have nushell for interactive use, but Doom uses bash when it shells out. If you are not using tmux, you can do something similar with terminal emulators. Here is how I told Doom to use login shell.