There is a zsh plugin (zsh-github-copilot) that automates this process. Just type what you want to do, hit a custom keybind, and buffer is replaced by a command that does what you described.
You can also have a second keybind that uses a zle widget to show an annotated description of the command currently in the buffer.
It works surprisingly well, and has saved me from having to dig through manpages several times.
Comments
Perfect! This will be useful for me.
I frequently ask the LLM for a command and then copy and paste it into the terminal already. Zev will be a nice upgrade.
There is a zsh plugin (zsh-github-copilot) that automates this process. Just type what you want to do, hit a custom keybind, and buffer is replaced by a command that does what you described.
You can also have a second keybind that uses a zle widget to show an annotated description of the command currently in the buffer.
It works surprisingly well, and has saved me from having to dig through manpages several times.