lang/sh: tweak interpolation + builtin fontification

This commit is contained in:
Henrik Lissner 2017-11-05 21:25:49 +01:00
parent d7a562faf5
commit 8428433898
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -33,12 +33,12 @@
;; 3. Fontify built-in/common commands (see `+sh-builtin-keywords')
(font-lock-add-keywords
'sh-mode `((+sh--match-variables-in-quotes
(1 'default prepend)
(1 'font-lock-constant-face prepend)
(2 'font-lock-variable-name-face prepend))
(+sh--match-command-subst-in-quotes
(1 'sh-quoted-exec prepend))
(,(regexp-opt +sh-builtin-keywords 'words)
(0 'font-lock-builtin-face append))))
(0 'font-lock-type-face append))))
;; autoclose backticks
(sp-local-pair 'sh-mode "`" nil :unless '(sp-point-before-word-p sp-point-before-same-p))