mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 03:26:42 +00:00
feat(shell): setup for GitHub Copilot CLI
This commit is contained in:
31
zsh/copilot.zsh
Normal file
31
zsh/copilot.zsh
Normal file
@@ -0,0 +1,31 @@
|
||||
#
|
||||
# Setup for GitHub Copilot CLI
|
||||
#
|
||||
|
||||
# Lazy-load the Copilot CLI helpers on first use.
|
||||
if command-exists github-copilot-cli; then
|
||||
setup_copilot-cli-integration() {
|
||||
local cmd="$1"
|
||||
shift
|
||||
|
||||
eval "$(github-copilot-cli alias -- "$SHELL")"
|
||||
|
||||
"$cmd" "$@"
|
||||
}
|
||||
|
||||
copilot_what-the-shell() {
|
||||
setup_copilot-cli-integration "$0" "$@"
|
||||
}
|
||||
alias '??'='copilot_what-the-shell'
|
||||
alias 'wts'='copilot_what-the-shell'
|
||||
|
||||
copilot_git-assist() {
|
||||
setup_copilot-cli-integration "$0" "$@"
|
||||
}
|
||||
alias 'git?'='copilot_git-assist'
|
||||
|
||||
copilot_gh-assist() {
|
||||
setup_copilot-cli-integration "$0" "$@"
|
||||
}
|
||||
alias 'gh?'='copilot_gh-assist'
|
||||
fi
|
||||
@@ -10,6 +10,7 @@ install_node_global_packages() {
|
||||
local npm_packages=(
|
||||
@commitlint/cli
|
||||
@commitlint/config-conventional
|
||||
@githubnext/github-copilot-cli
|
||||
@mermaid-js/mermaid-cli
|
||||
@prettier/plugin-php
|
||||
@prettier/plugin-ruby
|
||||
|
||||
Reference in New Issue
Block a user