Update command checks to use a faster method

This commit is contained in:
Jonny Barnes 2024-07-06 12:18:09 +01:00
parent 6ce632755c
commit 83b6e927c6
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8
7 changed files with 7 additions and 7 deletions

View file

@ -2,7 +2,7 @@
# Setup GitHub Copilot
# first check we even have the genereic `gh` command
if type gh > /dev/null; then
if (( ${+commands[gh]} )); 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)"