Skip to content

Commit

Permalink
Merge pull request #356 from containers/zsh
Browse files Browse the repository at this point in the history
Added a check to the zsh completions generation step
  • Loading branch information
rhatdan authored Oct 23, 2024
2 parents 33f217e + b9ed1ea commit f11144e
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 f11144e

Please sign in to comment.