[Feature request] Handle linebreaks
Thank you for this fantastic tool! 🙏 🙏 🙏
Your tool is a game-changer for me, especially since I can't access ChatGPT while I have my VPN enabled, so I can't use it at all while working.
It would be nice to have a natural way to handle linebreaks-- for example, for a prompt like "convert the following code from Pytorch to Tensorflow." Perhaps sgpt could drop you into $EDITOR the same way git does, where you could paste your text, and then exit.
Thoughts?
Thank you for your feedback!
The feature you are suggesting is actually a good idea. It can be implemented using additional argument for example, you would call sgpt --editor and it will drop you into $EDITOR where you could write entire prompt including code:
convert the following code from Pytorch to Tensorflow:
import torch
...
By the way, we can also pass any file content to the prompt using some shell magic:
sgpt "convert the following code from Pytorch to Tensorflow: $(cat my_pytorch.py)"
Implemented with --editor argument in PR https://github.com/TheR1D/shell_gpt/pull/27