NoahTheDuke / vim-just

Vim Just Syntax
MIT License
86 stars 8 forks source link

Support for `\u{...}` escapes in shell-expanded strings #113

Open laniakea64 opened 1 day ago

laniakea64 commented 1 day ago

An extreme example:

foo := x"\u{24}\u{7B}\u{46}\u{4F}\u{4f}\u{3A}\u{2D}default\u{7d}"
term := x"\u{000024}\u{00054}\u{0045}\u{052}\u{4d}"
$ just --evaluate
foo  := "default"
term := "xterm-256color"
$ FOO=1 just --evaluate
foo  := "1"
term := "xterm-256color"

Using \u{...} escapes in place of the $, the environment variable name (when not enclosed in {}), and/or the { } and :- delimiters results in vim-just not correctly highlighting the shell-expanded syntax.

Full support for this is unrealistic, particularly in the case of \u{...} in non-{}-enclosed environment variable names. And it seems unlikely these cases would occur in real-world usage. So to what extent should we support highlighting shell-expanded syntax written with \u{...} escapes instead of literally?