github / gh-copilot

Ask for assistance right in your terminal.

Home Page:https://docs.github.com/en/copilot/github-copilot-in-the-cli

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FEAT]: Select type of command via args

darinkishore opened this issue · comments

Describe the need

Being able to set the flag --shell would be useful to quickly call on copilot cli without going through another menu. i have the copilot cli set to alias "q" and another enter is not fun.

Great utility, by the way. Super useful, very streamlined, have loved it so far.

It seem that you can do gh copilot suggest -t shell to specify the type. This is mentioned by gh copilot suggest --help

I haven't found a way to tell it to automatically explain or copy to clipboard though.

@darinkishore : thank you for opening this issue as well as the kind words!! ❤ 🙇 🤗

As @pixelastic has mentioned, the -t,--target shell|gh|git flag is available for creating terminal aliases of gh alias short cuts. This is a topic of conversation within #5 to support terminal aliasing.

As far as short circuiting the suggest-revise loop with actions like copy to clipboard, I think that's a topic in #2 along with additional functionality. When originally designing the extension, there are times where the models can hallucinate or require additional information to get the most accurate suggestion, so short circuiting too early is not always the best experience.