Skip to content

reader_readline only ever reads from fish's STDIN #7358

@faho

Description

@faho

Via gitter we got a question about a git commit-msg hook.

These run in an environment with a non-tty stdin, so if you want to query the user, you'd have to read </dev/tty explicitly. See e.g. https://stackoverflow.com/questions/3417896/how-do-i-prompt-the-user-from-within-a-commit-msg-hook.

Only that won't work in fish, because even tho read receives the redirected fd, it'll call reader_readline, and that has hard-coded 0 pretty extensively (down to input_event_queue_t::readb using FD_SET(0, &fdset)).

It would be great if this worked.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions