Skip to content

string match -e "" -- foo does not return any output #4971

@mqudsi

Description

@mqudsi

I'm not certain if this is intentional, but a brief perusal of the relevant docs does not seem to indicate it's an explicit special case. When programmatically generating text to filter by literally (e.g. via commandline -ct), it is possible to evaluate string match -e "" -- ..., in which case the assumption would be that all text would match. In practice, this is an effective "match none" instead of "match all" filter.

My gut instinct is that this behavior isn't correct, but seeking feedback or comments before I patch this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that's not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions