chore: fix zsh completion on debian
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
352a00e83c
commit
de6a9eb3e4
3 changed files with 11 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -3,6 +3,7 @@
|
|||
/share/fish/vendor_completions.d
|
||||
/share/man/man1
|
||||
/share/zsh/site-functions
|
||||
/share/zsh/vendor-completions
|
||||
/gh-cli
|
||||
.envrc
|
||||
/dist
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
packager: deb
|
||||
|
|
|
|||
6
Makefile
6
Makefile
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue