mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 03:06:40 +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=(
|
local npm_packages=(
|
||||||
@commitlint/cli
|
@commitlint/cli
|
||||||
@commitlint/config-conventional
|
@commitlint/config-conventional
|
||||||
|
@githubnext/github-copilot-cli
|
||||||
@mermaid-js/mermaid-cli
|
@mermaid-js/mermaid-cli
|
||||||
@prettier/plugin-php
|
@prettier/plugin-php
|
||||||
@prettier/plugin-ruby
|
@prettier/plugin-ruby
|
||||||
|
|||||||
1
zshrc
1
zshrc
@@ -126,6 +126,7 @@ if [[ "$OSTYPE" == "linux"* ]]; then source "$DOTZSH/linux.zsh"; fi
|
|||||||
|
|
||||||
# Utils
|
# Utils
|
||||||
source "$DOTZSH/1password.zsh"
|
source "$DOTZSH/1password.zsh"
|
||||||
|
source "$DOTZSH/copilot.zsh"
|
||||||
source "$DOTZSH/emacs.zsh"
|
source "$DOTZSH/emacs.zsh"
|
||||||
source "$DOTZSH/fzf.zsh"
|
source "$DOTZSH/fzf.zsh"
|
||||||
source "$DOTZSH/less.zsh"
|
source "$DOTZSH/less.zsh"
|
||||||
|
|||||||
Reference in New Issue
Block a user