Skip to content

fish_prompt event still being sent on read #8797

@charlespierce

Description

@charlespierce

The changelog for 3.2.0 mentions that fish_prompt should not be sent on read and points to #7039, which indicates it was resolved and now there is a new event fish_read. However, if I create a function with --on-event fish_prompt, that function is still called when executing read:

chuck@chucks-mbp /U/chuck> function event_example --on-event fish_prompt
                               echo "FISH PROMPT EVENT"
                           end
FISH PROMPT EVENT
chuck@chucks-mbp /U/chuck> read
FISH PROMPT EVENT
read>

Fish Version: 3.3.1 and 3.4.0
No change if running fish without any customizations.

Is there a way to work around this or detect within the function that it's a read call rather than an actual prompt?

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