-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Description
Highlighting all errors the same way makes sense from a UI perspective (cough #691 cough), but it makes the tests weaker: when a test checks that an alias is highlighted as unknown-token
, it can't easily check whether that's due to a syntax error (as in alias x='() ]]'
) or due to, say, a command word not being an existing alias/function/etc. (as fixed in 9931990).
How about adding some new styles for more specific errors — e.g., unknown-token-not-a-command-name
, unknown-token-parse-error
, etc — that will be highlighted the same way by default, but will make the tests more specific?
vegerot
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
tests: Fix the test for alias loops.
phy1729 commentedon Mar 15, 2020
I thought there was already an issue for this, but perhaps all the discussion was on IRC. I think we need at least four new styles:
parse-error
for when zsh will error before attempting to run anything,unknown-arg0
for command not found,command-error
for things like[ -n foo;
orsudo;
, andlint-warning
for things like #691 and; ;
. All three (or more) can fallback tounknown-token
to maintain backwards compat.Unopposed to further splitting past those so that each error style is distinct.
danielshahaf commentedon Mar 15, 2020
Sounds good to me. Labelled "good first issue".
$foo/bar
in command position: parameter expansions with pasted constant strings #48413 remaining items