github-copilot-cli.fish
github-copilot-cli.fish copied to clipboard
Make GitHub Copilot CLI's alias work for Fish shell
github-copilot-cli.fish
[!IMPORTANT]
This plugin is obsolete as GitHub is sunsetting Copilot CLI: https://gist.github.com/idan/325676d192b32f169b032fde2d866c2c#github-next--technical-preview-sunsets
Make GitHub Copilot CLI's alias work for Fish shell. The current Copilot CLI in beta only supports bash-like syntax.
How to install
Via fisher
fisher install z11i/github-copilot-cli.fish
Manually
Copy the file conf.d/github-copilot-cli.fish to $__fish_config_dir/conf.d/ on your machine.
How to use
Because Fish shell does wildcards globbing, the default aliases shipped with the CLI do not play well. Therefore I changed ? to ! for all aliases.
!!: Translate natural language to arbitrary shell commandsgit!: Translate natural language to Git commandsgh!: Translate natural language to GitHub CLI commands
Use your own aliases
If you don't want the default aliases, what you can do now is to put these in your config.fish:
functions -e !! git! gh!
And use your own aliases, for example, to use ,:
alias , __copilot_what-the-shell
alias ,g __copilot_git-assist
alias ,gh __copilot_gh-assist