if there is a place for an AI cli, it would be in the man page. So many hours wasted searching for "-a" followed by, "/", "/", ...
Then, when finally locating the flag, it's nescessary to scroll up to confirm the right sub-command section, "/", "/", ...
When I have this problem, I catenate two outputs:
This way, I have all the matches at hand. When I pick the one I need, I select the line and search for it, finding the next occurrence in the full man-page.Checking sub-command section is trivial as well. Because the editor remembers the exact location of the cursor, you can always go back to it after scrolling up and down however you feel like.
For this scenario to work nicely, you have to have run the commands from a text editor. I use Acme [1], it’s optimized for this style of work and doesn’t shy away mice. (I think that the traditional TUI cannot be as smooth.)
So, to hell with AI.
[1]: https://p9f.org/sys/doc/acme/acme.html
After a while you learn to be specific ' -a' (with space) or '-a,', but this requires that you know what you're looking for. Also n/N is easier to jump between matches than /<Enter>, one less keypress.
Another useful trick is filtering with &, &/-a will narrow it down, but you won't know about the sub-commands if there are many matches. I just tried &/hidden on rg and fd and it takes me straight to `-., --hidden` for rg and `-H, --hidden` for fd. And &/case shows all options related to case-sensitivity with the descriptions. Once you get the intuition for it it's not that bad.
Manuals are not perfect but I don't think I would want an AI. I'm frustrated enough when I don't find a flag the LLM insists is supposed to be there and it gaslights me even though I'm telling the stupid thing I have the manual open.