Skip to content

Commit 9183fbe

Browse files
Include --options-with-hyphens in statement regex (zyedidia#3863)
1 parent fa68314 commit 9183fbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runtime/syntax/sh.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ rules:
3939
# Coreutils commands
4040
- type: "\\b(base64|basename|cat|chcon|chgrp|chmod|chown|chroot|cksum|comm|cp|csplit|cut|date|dd|df|dir|dircolors|dirname|du|env|expand|expr|factor|false|fmt|fold|head|hostid|id|install|join|link|ln|logname|ls|md5sum|mkdir|mkfifo|mknod|mktemp|mv|nice|nl|nohup|nproc|numfmt|od|paste|pathchk|pinky|pr|printenv|printf|ptx|pwd|readlink|realpath|rm|rmdir|runcon|seq|(sha1|sha224|sha256|sha384|sha512)sum|shred|shuf|sleep|sort|split|stat|stdbuf|stty|sum|sync|tac|tail|tee|test|time|timeout|touch|tr|true|truncate|tsort|tty|uname|unexpand|uniq|unlink|users|vdir|wc|who|whoami|yes)\\b"
4141
# Conditional flags
42-
- statement: "\\s+(-[A-Za-z]+|--[a-z]+)"
42+
- statement: "(\\s|^)(--?[A-Za-z0-9][\\w-]*)"
4343

4444
- identifier: "\\$\\{[\\w:!%&=+#~@*^$?, .\\-\\/\\[\\]]+\\}"
4545
- identifier: "\\$([0-9!#@*$?-]|[A-Za-z_]\\w*)"

0 commit comments

Comments
 (0)