lang/sh: improve zsh shebang detection regexp
This commit is contained in:
parent
5472cd4a37
commit
ae95b9e8d5
1 changed files with 1 additions and 1 deletions
|
@ -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))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue