sh: add rudimentary fontification for shell commands
This commit is contained in:
parent
af1e03b56c
commit
515171b957
1 changed files with 7 additions and 2 deletions
|
@ -1,8 +1,13 @@
|
||||||
;;; defuns-sh.el
|
;;; defuns-sh.el
|
||||||
|
|
||||||
(defvar sh-extra-font-lock--keywords
|
(defvar sh-extra-font-lock--keywords
|
||||||
'((narf/sh-extra-font-lock--match-var-in-double-quoted-string
|
`((narf/sh-extra-font-lock--match-var-in-double-quoted-string
|
||||||
(2 font-lock-variable-name-face prepend))))
|
(2 font-lock-variable-name-face prepend))
|
||||||
|
(,(concat
|
||||||
|
"\\<"
|
||||||
|
(regexp-opt '("sudo" "echo" "ls" "sleep" "tee" "cd" "cat" "service"))
|
||||||
|
"\\>")
|
||||||
|
(0 'font-lock-builtin-face))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun narf/sh-extra-font-lock--is-in-double-quoted-string ()
|
(defun narf/sh-extra-font-lock--is-in-double-quoted-string ()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue