148 字
1 分钟
在pwsh里面使用终端Github Copilot

如果在终端里面也可以使用github copilot将会方便很多,很多命令不用刻意去记忆,也不用去网上找很久。

先去下载Github-CLI。 然后用gh auth login登陆,默认是不安装copilot的,要手动安装插件gh extension install github/gh-copilot

测试一下gh copilot是不是正常使用。

然后设置别名,方便使用。 通过读取配置文件echo $PROFILE的路径,然后修改notepad $PROFILE。 加入以下内容。

Terminal window
function Github-Copilot-Explain { gh copilot explain $args }
function Github-Copilot-Suggest { gh copilot suggest $args }
Set-Alias -Name cs -Value Github-Copilot-Suggest
Set-Alias -Name ce -Value Github-Copilot-Explain
在pwsh里面使用终端Github Copilot
https://tski.uk/blog/github-copilot/
作者
Tokisaki Galaxy
发布于
2023-12-20
许可协议
CC BY