3 ms·
Hm, are there similar projects that simply works as a shell filter? Prompt on std in / answer on stdout ? Would make for a perfect vim companion - select text,
by e12e 4y ago
Hm, are there similar projects that simply works as a shell filter? Prompt on std in / answer on stdout ?
Would make for a perfect vim companion - select text, hit "!gpt3" - get answer in buffer?
I'm not very keen on running some random shell commands directly - but having them pop into my editor (safe and recommended wrapper for strict shell script - or - sample python cli utility etc).
Ed: As a bonus it would also compose easily - making adding an interface like https://github.com/jayhack/llm.sh https://github.com/jayhack/llm.sh on top would be trivial...
Ed2: i see there's https://github.com/jackMort/ChatGPT.nvim https://github.com/jackMort/ChatGPT.nvim and https://github.com/gakonst/rubberduck-gpt3.vim https://github.com/gakonst/rubberduck-gpt3.vim - both of which would be better if they also/just worked as filters.
- ilaksh 4y agoI use my own similar tool (https://github https://github com/runvnc/askleo) like this in vim :r ! askleo a JavaScript function to reverse a string
- e12e 4y agoThanks! Does it take prompt on stdin too? Fixed link: https://github.com/runvnc/askleo https://github.com/runvnc/askleo
- ilaksh 4y agoHmm. I think just command args.
- e12e 4y agoYes, I had a quick look at the code (nice and simple!). Should be possible to adjust to stdin as well - maybe I'll have a try if I find the time.
- senorsmile 4y agoMight be able to use xargs