mirror of
git://git.sv.gnu.org/nano.git
synced 2025-02-16 21:34:26 +03:00
syntax: sh: colorize options only when they are preceded by whitespace
To prevent any filenames containing hyphens getting partially colored. Reported-by: Brand Huntsman <alpha@qzx.com>
This commit is contained in:
parent
0cd833e64b
commit
cf1129a8b4
@ -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)\>"
|
||||
|
Loading…
x
Reference in New Issue
Block a user