3 ms·
I've been wanting to build something like this by integrating into the terminal itself. Seems very straight forward and avoids the screen shotting. So you would
by zmmmmm 3y ago
I've been wanting to build something like this by integrating into the terminal itself. Seems very straight forward and avoids the screen shotting. So you would just type a comment in the right format and it would recognise it:
$ ls
a.txt b.txt c.txt
$ # AI: concatenate these files and sort the result on the third column
$ #....
$ # cat a.txt b.txt c.txt | sort -k 3
This already works brilliantly by just pasting into CodeLLaMa so it's purely terminal integration to make it work. All i need is the rest of life to stop being so annoyingly busy.
- paulmedwards 3y agoI wrote a simple command line app to let me quickly ask a quick question in the terminal - https://github.com/edwardsp/qq https://github.com/edwardsp/qq. It outputs the command I need and puts it in the paste buffer. I use it all the time now, e.g. $ qq concatenate all files in the current directory and sort the result on the third column cat * | sort -k3
- zmmmmm 3y agoyep absolutely - have seen a few of those. And how well they work is what inspires me to want the next parts, which are (a) send the surrounding lines and output as context - notice above I can ask it about "these files" (b) automatically add the result to terminal history so I can avoid copy/paste if I want to run it. I think this could make these things absolutely fluid, almost like autocomplete (another crazy idea is to actually tie it into bash-completion so when you press tab it does the above). CodeLLama with GPU acceleration on Mac M1 is almost instant in response, its really compelling.
- paulmedwards 3y agoYes, that's a good suggestion. I've just pushed a change to my utility to provide the paste buffer along with the question. This does mean you need to select the lines first but will work with your exact question now. It's actually useful to quickly provide more data when asking a question where I would have needed to think more about how to phrase the question previously. Btw it automatically puts the output into the paste buffer so there is no need to manually copy the result before pasting. Of course, full integration with the terminal would be good!