mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
lang/sh: improve zsh shebang detection regexp
This commit is contained in:
@ -50,7 +50,7 @@
|
|||||||
(string-match-p "\\.zsh\\'" buffer-file-name))
|
(string-match-p "\\.zsh\\'" buffer-file-name))
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(looking-at-p "^#!.+zsh[$\\s-]")))
|
(looking-at-p "^#!.+/zsh[$ ]")))
|
||||||
(sh-set-shell "zsh")))
|
(sh-set-shell "zsh")))
|
||||||
(add-hook 'sh-mode-hook #'+sh|detect-zsh))
|
(add-hook 'sh-mode-hook #'+sh|detect-zsh))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user