This change fixes redirected stdin. For example, consider we have a query file:
How are you doing?
Before:
chatgpt <query
Welcome to chatgpt. You can quit with 'exit'.
Enter a prompt:
(waits for prompt)
After: (expected)
chatgpt <query
As an AI language model, I don't have feelings, but I'm functioning well and ready to assist you with any questions or tasks you have.
PS: Pipes still work as expected:
$ echo "How are you doing?" | chatgpt
As an AI language model, I do not have feelings, but I am functioning properly and ready to assist you with any questions or tasks you may have.
I am not the vim type 😅 so I haven't thought of that use case, but your example makes it clear it is a very useful one. Thank you very much for this contribution! 🙏
This change fixes redirected stdin. For example, consider we have a
query
file:Before:
After: (expected)
PS: Pipes still work as expected:
PS2: This empowers use cases such as this: