File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33/share /fish /vendor_completions.d
44/share /man /man1
55/share /zsh /site-functions
6+ /share /zsh /vendor-completions
67/gh-cli
78.envrc
89/dist
Original file line number Diff line number Diff line change @@ -106,3 +106,8 @@ nfpms: #build:linux
106106 dst : " /usr/share/fish/vendor_completions.d/gh.fish"
107107 - src : " ./share/zsh/site-functions/_gh"
108108 dst : " /usr/share/zsh/site-functions/_gh"
109+ # Debian/Ubuntu zsh does not look in /usr/share/zsh/site-functions by default,
110+ # so we also install to vendor-completions. See https://github.com/cli/cli/issues/13166
111+ - src : " ./share/zsh/vendor-completions/_gh"
112+ dst : " /usr/share/zsh/vendor-completions/_gh"
113+ packager : deb
Original file line number Diff line number Diff line change @@ -33,10 +33,14 @@ manpages: script/build$(EXE)
3333
3434.PHONY : completions
3535completions : bin/gh$(EXE )
36- mkdir -p ./share/bash-completion/completions ./share/fish/vendor_completions.d ./share/zsh/site-functions
36+ mkdir -p ./share/bash-completion/completions ./share/fish/vendor_completions.d ./share/zsh/site-functions ./share/zsh/vendor-completions
3737 bin/gh$(EXE ) completion -s bash > ./share/bash-completion/completions/gh
3838 bin/gh$(EXE ) completion -s fish > ./share/fish/vendor_completions.d/gh.fish
3939 bin/gh$(EXE ) completion -s zsh > ./share/zsh/site-functions/_gh
40+ # On Debian/Ubuntu the default zsh fpath does not include /usr/share/zsh/site-functions
41+ # but does include /usr/share/zsh/vendor-completions, so we ship both paths in our
42+ # .deb and .rpm packages. See https://github.com/cli/cli/issues/13166
43+ cp ./share/zsh/site-functions/_gh ./share/zsh/vendor-completions/_gh
4044
4145.PHONY : lint
4246lint :
You can’t perform that action at this time.
0 commit comments