Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
chore: fix zsh completion on debian
Co-authored-by: Copilot <[email protected]>
  • Loading branch information
babakks and Copilot committed Apr 24, 2026
commit de6a9eb3e440a7ee5d1b40ec49914e469c413442
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/share/fish/vendor_completions.d
/share/man/man1
/share/zsh/site-functions
/share/zsh/vendor-completions
/gh-cli
.envrc
/dist
Expand Down
5 changes: 5 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,8 @@ nfpms: #build:linux
dst: "/usr/share/fish/vendor_completions.d/gh.fish"
- src: "./share/zsh/site-functions/_gh"
dst: "/usr/share/zsh/site-functions/_gh"
# Debian/Ubuntu zsh does not look in /usr/share/zsh/site-functions by default,
# so we also install to vendor-completions. See https://github.com/cli/cli/issues/13166
- src: "./share/zsh/vendor-completions/_gh"
dst: "/usr/share/zsh/vendor-completions/_gh"
Comment thread
babakks marked this conversation as resolved.
packager: deb
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,14 @@ manpages: script/build$(EXE)

.PHONY: completions
completions: bin/gh$(EXE)
mkdir -p ./share/bash-completion/completions ./share/fish/vendor_completions.d ./share/zsh/site-functions
mkdir -p ./share/bash-completion/completions ./share/fish/vendor_completions.d ./share/zsh/site-functions ./share/zsh/vendor-completions
bin/gh$(EXE) completion -s bash > ./share/bash-completion/completions/gh
bin/gh$(EXE) completion -s fish > ./share/fish/vendor_completions.d/gh.fish
bin/gh$(EXE) completion -s zsh > ./share/zsh/site-functions/_gh
# On Debian/Ubuntu the default zsh fpath does not include /usr/share/zsh/site-functions
# but does include /usr/share/zsh/vendor-completions, so we ship both paths in our
# .deb and .rpm packages. See https://github.com/cli/cli/issues/13166
cp ./share/zsh/site-functions/_gh ./share/zsh/vendor-completions/_gh

.PHONY: lint
lint:
Expand Down
Loading