Skip to content

[zsh] anonymous function breaks the alias after it #127

@FranklinYu

Description

@FranklinYu

The code with a problem is:

function named {
	# do something
}
alias foo=bar  # highlights correctly

function {
	# do something anonymously
}
alias foo=bar  # highlights incorrectly
alias bar=baz  # recovered

function {
	# do something anonymously
}

alias foo=bar  # no problem

It looks like:

Image

It should look like:

The keyword alias should be highlighted even right after the anonymous function.

Reference: https://zsh.sourceforge.io/Doc/Release/Functions.html#Anonymous-Functions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions