diff --git a/lisp/cli/doctor.el b/lisp/cli/doctor.el index 788527eea..f9bccfe33 100644 --- a/lisp/cli/doctor.el +++ b/lisp/cli/doctor.el @@ -170,21 +170,19 @@ in." (print! (start "Checking for common environmental issues...")) (print-group! - (when (string-match-p "/fish$" shell-file-name) - (print! (warn "Detected Fish as your $SHELL")) - (explain! "Fish (and possibly other non-POSIX shells) is known to inject garbage " - "output into some of the child processes that Emacs spawns. Many Emacs " - "packages/utilities will choke on this output, causing unpredictable issues. " - "To get around this, either:\n\n" - " - Add the following to $DOOMDIR/config.el:\n\n" - " (setq shell-file-name (executable-find \"bash\"))\n\n" - " - Or change your default shell to a POSIX shell (like bash or zsh) " - " and explicitly configure your terminal apps to use the shell you " - " want.\n\n" - "If you opt for option 1 and use one of Emacs' terminal emulators, you " - "will also need to configure them to use Fish, e.g.\n\n" - " (setq-default vterm-shell (executable-find \"fish\"))\n\n" - " (setq-default explicit-shell-file-name (executable-find \"fish\"))\n")) + (when (or (string-match-p "/fish$" shell-file-name) + (string-match-p "/nu$" shell-file-name)) + (print! (warn "Detected a non-POSIX $SHELL")) + (explain! "Non-POSIX shells (particularly Fish and Nushell) can cause unpredictable issues " + "with any Emacs utilities that spawn child processes from shell commands (like " + "diff-hl and in-Emacs terminals). To get around this, configure Emacs to use a " + "POSIX shell internally, e.g.\n\n" + " ;;; add to $DOOMDIR/config.el:\n" + " (setq shell-file-name (executable-find \"bash\"))\n\n" + "Emacs' terminal emulators can be safely configured to use your original $SHELL:\n\n" + " ;;; add to $DOOMDIR/config.el:\n" + (format " (setq-default vterm-shell \"%s\")\n" shell-file-name) + (format " (setq-default explicit-shell-file-name \"%s\")\n" shell-file-name))) (condition-case e (when (featurep :system 'windows)