You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
I've had to resort to using /dev/tty a lot in my fish scripts for a few other cases as well, but it's important to note that it's not just unfriendly but also unportable since I think it's a Linux-only thing.
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 callreader_readline
, and that has hard-coded0
pretty extensively (down to input_event_queue_t::readb usingFD_SET(0, &fdset)
).It would be great if this worked.
The text was updated successfully, but these errors were encountered: