Many blog show that they can use GitHub Copilot with ?? ...
. However, according to the official docs, you can only use it with gh copilot explain ...
or gh copilot suggest ...
.
I have found that their difference is the way of installation:
- The former version is installed through npm:
npm install -g @githubnext/github-copilot-cli
- The latter version is installed through
gh extension install github/gh-copilot
I have tried to install with npm, but when I tried to auth it with my GitHub account, it told me that I'm not on the waitlist and refused. However, the waitlist doesn't exist now because this tool is in beta stage.
PS: I'm a college student, so my copilot plan is free version (included in the student pack). I'm not sure whether this matters.
If you are looking to get the ?? functionality, you need to add a function to Powershell. It is essentially a shortcut, so instead of typing
, you would use
To do so
go to powershell and type
notepad $profile
add this function
function ?? {
}
copied and modified shamelessly from Scott Hanselman's blog [https://www.hanselman.com/blog/github-copilot-for-cli-for-powershell][1]
Restart powershell and you should be able to type