Skip to content

Commit

Permalink
Added a check to the zsh completions generation step
Browse files Browse the repository at this point in the history
Ensuring that zsh is actually supported

Signed-off-by: Eric Curtin <[email protected]>
  • Loading branch information
ericcurtin committed Oct 23, 2024
1 parent 89f0d25 commit b9ed1ea
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,13 @@ completions:
mkdir -p completions/fish/vendor_completions.d
register-python-argcomplete --shell fish ramalama > completions/fish/vendor_completions.d/ramalama.fish

mkdir -p completions/zsh/vendor-completions
register-python-argcomplete --shell zsh ramalama > completions/zsh/vendor-completions/_ramalama
tmpfile=$$(mktemp); \
if ! register-python-argcomplete --shell zsh ramalama > $${tmpfile}; then \
mkdir -p completions/zsh/vendor-completions; \
mv $${tmpfile} completions/zsh/vendor-completions/_ramalama; \
else \
rm $${tmpfile}; \
fi

.PHONY: install
install: docs completions
Expand Down

0 comments on commit b9ed1ea

Please sign in to comment.