Commit cf1129a8 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

syntax: sh: colorize options only when they are preceded by whitespace


To prevent any filenames containing hyphens getting partially colored.
Reported-by: default avatarBrand Huntsman <alpha@qzx.com>
No related merge requests found
Showing with 1 addition and 1 deletion
+1 -1
......@@ -16,7 +16,7 @@ color green "[{}():;|`$<>!=&\\]" "(\]|\[)"
color green "-(eq|ne|gt|lt|ge|le|ef|ot|nt)\>"
# Short and long options.
color brightmagenta "-[A-Za-z]\>" "--[A-Za-z-]+\>"
color brightmagenta "[[:blank:]]-[A-Za-z]\>" "[[:blank:]]--[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)\>"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment