[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] [PATCH] syntax: sh: color options distinctively, and color
From: |
Benno Schulenberg |
Subject: |
[Nano-devel] [PATCH] syntax: sh: color options distinctively, and color also long options |
Date: |
Wed, 28 Mar 2018 14:31:40 +0200 |
Also add some comments.
---
syntax/sh.nanorc | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/syntax/sh.nanorc b/syntax/sh.nanorc
index cf251858..04ca687f 100644
--- a/syntax/sh.nanorc
+++ b/syntax/sh.nanorc
@@ -6,12 +6,19 @@ magic "(POSIX|Bourne-Again) shell script.*text"
linter dash -n
comment "#"
+# Function declarations.
icolor brightgreen "^[0-9A-Z_]+\(\)"
+
+# Keywords, symbols, and comparisons.
color green
"\<(break|case|continue|do|done|elif|else|esac|exit|fi|for|function|if|in|read|return|select|shift|then|time|until|while)\>"
color green "\<(declare|eval|exec|export|let|local)\>"
color green "[{}():;|`$<>!=&\\]" "(\]|\[)"
-color green "-[Ldefgruwx]\>"
-color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
+color green "-(eq|ne|gt|lt|ge|le|ef|ot|nt)\>"
+
+# Short and long options.
+color brightmagenta "-[A-Za-z]\>" "--[A-Za-z-]+\>"
+
+# Common commands.
color brightblue
"\<(awk|cat|cd|ch(grp|mod|own)|cp|cut|echo|env|grep|head|install|ln|make|mkdir|mv|popd|printf|pushd|rm|rmdir|sed|set|sort|tail|tar|touch|umask|unset)\>"
color normal "[.-]tar\>"
--
2.16.2
- [Nano-devel] [PATCH] syntax: sh: color options distinctively, and color also long options,
Benno Schulenberg <=