Open PavelSafronov opened 6 months ago
From what I can gather, it occurs when the alias has a period (as well as a few other characters).
All aliases that contain a .
will have incorrect highlighting for the remainder of that alias' scope only and the problem doesn't 'bleed' to other aliases.
Syntax highlighting fails for l.
alias but resumes for the following `rm
alias:
Syntax highlighting fails for cd..
but NOT cd-
Is it the responsibility of a syntax highlighter to adhere to the specifications of a language even when that allows for valid code that has unexpected functionality?
Regarding valid aliases, the Bash man pages say:
Aliases 🔗
The characters /, $, `, and = and any of the shell metacharacters or quoting characters listed above may not appear in an alias name.
Metacharacter 🔗
A character that, when unquoted, separates words. A metacharacter is a space, tab, newline, or one of the following characters: ‘|’, ‘&’, ‘;’, ‘(’, ‘)’, ‘<’, or ‘>’.
Which seems to allow foo.
as an acceptable alias, which seems reasonable. However it also allows bar[
which in my testing, causes the alias not to function as expected.
The code with a problem is:
It looks like:
It should look like:
The two lines should have the same highlighting:
alias
should blue in both cases.