Skip to content

Instantly share code, notes, and snippets.

View LuisAndrino's full-sized avatar
🎃
Focusing

Luis Andrino LuisAndrino

🎃
Focusing
View GitHub Profile
@LuisAndrino
LuisAndrino / GitHubCopilotCLIAlias.ps1
Created April 25, 2023 19:09 — forked from MattJeanes/GitHubCopilotCLIAlias.ps1
Alias commands to use GitHub Copilot CLI in PowerShell
# You should insert this script into your PowerShell Profile script so it exists in every session
# Fun fact: This script was mostly generated by ChatGPT by giving it the bash version of the output
# from `github-copilot-cli alias -- "$0"` with a few fixes from me
function Invoke-CopilotWhatTheShell {
$TMPFILE = New-TemporaryFile;
try {
github-copilot-cli what-the-shell $args --shellout $TMPFILE
if ($LASTEXITCODE -eq 0) {
h scroll left
j scroll down
k scroll up
l scroll right
gg scroll to top of the page
G scroll to bottom of the page
f activate link hints mode to open in current tab
F activate link hints mode to open in new tab
r reload