Files
Kira f7aee7c4fe Fix highlighting of aliases to external commands (#15408)
Fixes #12965.

# Description
The syntax highlighter currently can't tell the difference between
external command calls and _alias_ calls to external commands. This
leads to unexpected behavior when `highlight_resolved_externals` is
enabled. Specifically, when this option is enabled, alias calls aliasing
external commands are highlighted according to
`color_config.shape_external_resolved` if and only if a command exists
in the PATH directories whose name happens to be the same as the name of
the alias.

The syntax highlighter also can't tell the difference between internal
command calls and alias calls aliasing internal commands, but this just
results in these alias calls being highlighted like normal internal
command calls, which isn't too unexpected.

It is ambiguous what the correct behavior should be. The three options I
can think of are:

1. Treat all alias calls (both aliasing internal and external commands)
as a new shape, like `shape_alias`, and highlight accordingly.
2. Highlight all alias calls like internal command calls, including
those aliasing external commands.
3. Highlight alias calls aliasing external commands according to how the
aliased command would have been highlighted.

I personally like 3. and it was easy to implement (unless I missed
something), so that's what this PR does right now. I'll be happy to
implement a different solution if appropriate. Discussion welcome :)

# User-Facing Changes
All changes are in syntax highlighting only.

Behavior _before_ this PR:

![image](https://github.com/user-attachments/assets/1dc855df-fde8-489e-8c5e-c02979874289)

Behavior _after_ this PR:

![image](https://github.com/user-attachments/assets/9e3a03bf-6730-4849-9123-42bd6b08dd39)

# Tests + Formatting
I didn't write any tests because I couldn't find any existing tests for
syntax highlighting.
2025-08-21 20:05:15 +02:00
..
2025-07-15 15:30:18 +03:00
2025-05-13 16:49:30 +02:00
2025-07-15 15:30:18 +03:00
2025-05-13 16:49:30 +02:00