-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Copilot added a shell-specific aliases generator function.
❯ gh copilot alias --help
Generate optional shell-specific aliases and functions for invoking gh copilot commands.
These aliases and functions are not required to use gh copilot, but they can be useful for convenience as they require fewer keystrokes and aid in executing suggested commands:
- `ghce`: wraps `gh copilot explain`
- `ghcs`: wraps `gh copilot suggest`, adding support for executing suggestions
Usage:
copilot alias <shell> [flags]
Examples:
# Add aliases to Bash configuration
$ echo 'eval "$(gh copilot alias -- bash)"' >> ~/.bashrc
# Add aliases to PowerShell profile
$ $GH_COPILOT_PROFILE = Join-Path -Path $(Split-Path -Path $PROFILE -Parent) -ChildPath "gh-copilot.ps1"
$ gh copilot alias -- pwsh | Out-File ( New-Item -Path $GH_COPILOT_PROFILE -Force )
$ echo ". `"$GH_COPILOT_PROFILE`"" >> $PROFILE
# Add aliases to Zsh configuration
$ echo 'eval "$(gh copilot alias -- zsh)"' >> ~/.zshrc
Flags:
-h, --help help for alias
Global Flags:
--hostname string The GitHub host to use for authentication
Could be added into CodePilot first initialization.
Metadata
Metadata
Assignees
Labels
No labels