Open
Description
In f() {}
, highlight f
specially. Ditto for f g h() {}
when MULTI_FUNC_DEF is in effect (that would help with a common user mistake).
The default color of f
g
h
shall be different from the default color of the [command] style.
The first word is parsed differently from the others: it is subject to alias expansion and to must not be a reserved word. That said, using a reserved word for g
or h
would probably be a mistake on the user's part (so it might be useful to check for that and highlight it as unknown-token).
The first word should never be considered for the [command] and [path] highlights.
Further ideas (which might be good and might be pure feature creep):
- Highlight the syntax
function f g h () {}
as well? - Highlight
f
differently depending on whether it shadows/overwrites an existing function, builtin, or command?
Compare #194.