Add support for the new github copilot cli plugin

This commit is contained in:
Jonny Barnes 2024-03-22 16:17:21 +00:00
parent 84ac855934
commit 5ecde859e8
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8

View file

@ -167,8 +167,12 @@ if type fnm > /dev/null; then
fi fi
# Setup GitHub Copilot # Setup GitHub Copilot
if type github-copilot-cli > /dev/null; then # first check we even have the genereic `gh` command
eval "$(github-copilot-cli alias -- "$0")" if type gh > /dev/null; then
# Now check we have the copilot plugin installed with `gh`
if gh extension list | rg copilot -c > /dev/null; then
eval "$(gh copilot alias -- zsh)"
fi
fi fi
# Init the fuck # Init the fuck