From the course: Complete Guide to GitHub Copilot for Developers by Microsoft Press

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Configure GitHub Copilot with CLI aliases

Configure GitHub Copilot with CLI aliases

- [Instructor] Remember earlier in this lesson I mentioned that the GitHub Copilot developers created some shim functions in order to make the tool a bit easier to use. This is an extract of that code. Basically, we're talking about, instead of having to do gh copilot suggest or gh copilot explain, we instead can run gh copilot alias and have it create a helper function. Well, it's not creating the function, they're already created, it's spitting it out for you for one of those three shell environments. So for PowerShell, I would add this code into my startup script. You'd do the same thing for Bash. And that way, whenever I want to do a gh copilot explain, I can simply type ghce, and I can do ghcs for GitHub for gh copilot suggest. These are just quality of life. In fact, there's the declaration right there. These functions are just quality of life shim functions that give us some input, validation, and sanitation, and some nice process. And it's an easy way to just use the CLI in a…

Contents