From 5ecde859e8451d7a06d7def869ea874208aabdde Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Fri, 22 Mar 2024 16:17:21 +0000 Subject: [PATCH] Add support for the new github copilot cli plugin --- zshrc.zsh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/zshrc.zsh b/zshrc.zsh index ab315e9..c1ad4ae 100644 --- a/zshrc.zsh +++ b/zshrc.zsh @@ -167,8 +167,12 @@ if type fnm > /dev/null; then fi # Setup GitHub Copilot -if type github-copilot-cli > /dev/null; then - eval "$(github-copilot-cli alias -- "$0")" +# first check we even have the genereic `gh` command +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 # Init the fuck