London Escorts sunderland escorts 1v1.lol unblocked yohoho 76 https://www.symbaloo.com/mix/yohoho?lang=EN yohoho https://www.symbaloo.com/mix/agariounblockedpvp https://yohoho-io.app/ https://www.symbaloo.com/mix/agariounblockedschool1?lang=EN
0.3 C
New York
Thursday, January 30, 2025

GitHub Copilot for CLI for PowerShell


GitHub Subsequent has this cool mission that’s mainly Copilot for the CLI (command line interface). You’ll be able to join their waitlist on the Copilot for CLI web site.

Copilot for CLI gives three shell instructions: ??, git? and gh?

That is cool and all, however I take advantage of PowerShell. Seems these ?? instructions are simply router instructions to a bigger EXE referred to as github-copilot-cli. So in case you go “?? one thing” you are actually going “github-copilot-cli what-the-shell one thing.”

So this implies I ought to be capable of to do the identical/comparable aliases for my PowerShell immediate AND change the injected immediate (take a look at me I am a immediate engineer) so as to add ‘use powershell to.’

Now it is not excellent, however hopefully it’s going to make the purpose to the Copilot CLI staff that PowerShell wants love additionally.

Listed here are my aliases. Be at liberty to counsel if these suck. Observe the addition of “person powershell to” for the ?? one. I’ll make a ?? and a p? the place one does bash and one does PowerShell. I might even have it use wsl.exe and shell out to bash. A number of potentialities.

operate ?? { 
$TmpFile = New-TemporaryFile
github-copilot-cli what-the-shell ('use powershell to ' + $args) --shellout $TmpFile
if ([System.IO.File]::Exists($TmpFile)) {
$TmpFileContents = Get-Content material $TmpFile
if ($TmpFileContents -ne $nill) {
Invoke-Expression $TmpFileContents
Take away-Merchandise $TmpFile
}
}
}

operate git? {
$TmpFile = New-TemporaryFile
github-copilot-cli git-assist $args --shellout $TmpFile
if ([System.IO.File]::Exists($TmpFile)) {
$TmpFileContents = Get-Content material $TmpFile
if ($TmpFileContents -ne $nill) {
Invoke-Expression $TmpFileContents
Take away-Merchandise $TmpFile
}
}
}
operate gh? {
$TmpFile = New-TemporaryFile
github-copilot-cli gh-assist $args --shellout $TmpFile
if ([System.IO.File]::Exists($TmpFile)) {
$TmpFileContents = Get-Content material $TmpFile
if ($TmpFileContents -ne $nill) {
Invoke-Expression $TmpFileContents
Take away-Merchandise $TmpFile
}
}
}

It additionally then presents to run the command. Very clean.

image

Hope you prefer it. A number of enjoyable stuff taking place on this house.




About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, guide, father, diabetic, and Microsoft worker. He’s a failed stand-up comedian, a cornrower, and a ebook writer.

facebook
twitter
subscribe
About   Publication

Internet hosting By
Hosted in an Azure App Service










Related Articles

Social Media Auto Publish Powered By : XYZScripts.com