mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
docs: warn users about nushell issues
Like Fish, using nushell as your shell-file-name can cause downstream issues wherever Emacs (or Emacs packages) spawn child processes via a shell command and rely on its output. For example: diff-hl users may not see a git gutter if nushell (or fish) is their $SHELL.
This commit is contained in:
@ -170,21 +170,19 @@ in."
|
|||||||
|
|
||||||
(print! (start "Checking for common environmental issues..."))
|
(print! (start "Checking for common environmental issues..."))
|
||||||
(print-group!
|
(print-group!
|
||||||
(when (string-match-p "/fish$" shell-file-name)
|
(when (or (string-match-p "/fish$" shell-file-name)
|
||||||
(print! (warn "Detected Fish as your $SHELL"))
|
(string-match-p "/nu$" shell-file-name))
|
||||||
(explain! "Fish (and possibly other non-POSIX shells) is known to inject garbage "
|
(print! (warn "Detected a non-POSIX $SHELL"))
|
||||||
"output into some of the child processes that Emacs spawns. Many Emacs "
|
(explain! "Non-POSIX shells (particularly Fish and Nushell) can cause unpredictable issues "
|
||||||
"packages/utilities will choke on this output, causing unpredictable issues. "
|
"with any Emacs utilities that spawn child processes from shell commands (like "
|
||||||
"To get around this, either:\n\n"
|
"diff-hl and in-Emacs terminals). To get around this, configure Emacs to use a "
|
||||||
" - Add the following to $DOOMDIR/config.el:\n\n"
|
"POSIX shell internally, e.g.\n\n"
|
||||||
" (setq shell-file-name (executable-find \"bash\"))\n\n"
|
" ;;; add to $DOOMDIR/config.el:\n"
|
||||||
" - Or change your default shell to a POSIX shell (like bash or zsh) "
|
" (setq shell-file-name (executable-find \"bash\"))\n\n"
|
||||||
" and explicitly configure your terminal apps to use the shell you "
|
"Emacs' terminal emulators can be safely configured to use your original $SHELL:\n\n"
|
||||||
" want.\n\n"
|
" ;;; add to $DOOMDIR/config.el:\n"
|
||||||
"If you opt for option 1 and use one of Emacs' terminal emulators, you "
|
(format " (setq-default vterm-shell \"%s\")\n" shell-file-name)
|
||||||
"will also need to configure them to use Fish, e.g.\n\n"
|
(format " (setq-default explicit-shell-file-name \"%s\")\n" shell-file-name)))
|
||||||
" (setq-default vterm-shell (executable-find \"fish\"))\n\n"
|
|
||||||
" (setq-default explicit-shell-file-name (executable-find \"fish\"))\n"))
|
|
||||||
|
|
||||||
(condition-case e
|
(condition-case e
|
||||||
(when (featurep :system 'windows)
|
(when (featurep :system 'windows)
|
||||||
|
Reference in New Issue
Block a user