From 515171b9575acec3cd91d120cd436f083fae7b74 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 10 Mar 2016 23:55:12 -0500 Subject: [PATCH] sh: add rudimentary fontification for shell commands --- modules/defuns/defuns-sh.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/defuns/defuns-sh.el b/modules/defuns/defuns-sh.el index 1502e1110..6a6aabff5 100644 --- a/modules/defuns/defuns-sh.el +++ b/modules/defuns/defuns-sh.el @@ -1,8 +1,13 @@ ;;; defuns-sh.el (defvar sh-extra-font-lock--keywords - '((narf/sh-extra-font-lock--match-var-in-double-quoted-string - (2 font-lock-variable-name-face prepend)))) + `((narf/sh-extra-font-lock--match-var-in-double-quoted-string + (2 font-lock-variable-name-face prepend)) + (,(concat + "\\<" + (regexp-opt '("sudo" "echo" "ls" "sleep" "tee" "cd" "cat" "service")) + "\\>") + (0 'font-lock-builtin-face)))) ;;;###autoload (defun narf/sh-extra-font-lock--is-in-double-quoted-string ()