Support $''-quoted strings.

This does not yet highlight backslash escapes within them.
This commit is contained in:
Daniel Shahaf
2015-09-10 19:58:02 +00:00
parent 6d93ea07fd
commit a8afbdf2f5
3 changed files with 39 additions and 0 deletions

View File

@@ -51,6 +51,7 @@
: ${ZSH_HIGHLIGHT_STYLES[back-quoted-argument]:=none}
: ${ZSH_HIGHLIGHT_STYLES[single-quoted-argument]:=fg=yellow}
: ${ZSH_HIGHLIGHT_STYLES[double-quoted-argument]:=fg=yellow}
: ${ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]:=fg=yellow}
: ${ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]:=fg=cyan}
: ${ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]:=fg=cyan}
: ${ZSH_HIGHLIGHT_STYLES[assign]:=none}
@@ -198,6 +199,8 @@ _zsh_highlight_main_highlighter()
_zsh_highlight_main_highlighter_highlight_string
substr_color=1
;;
\$\'*) style=$ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]
;;
'`'*) style=$ZSH_HIGHLIGHT_STYLES[back-quoted-argument];;
*[*?]*) $highlight_glob && style=$ZSH_HIGHLIGHT_STYLES[globbing] || style=$ZSH_HIGHLIGHT_STYLES[default];;
*) if _zsh_highlight_main_highlighter_check_path; then