mirror of
https://github.com/ihabunek/toot.git
synced 2024-09-29 04:35:54 -04:00
Add install-bash-completion and install-shell-completion targets
This commit is contained in:
parent
6cf0e84d7a
commit
de7688d284
18
Makefile
18
Makefile
@ -47,3 +47,21 @@ bundle:
|
|||||||
--output toot-`git describe`.pyz bundle \
|
--output toot-`git describe`.pyz bundle \
|
||||||
--compress
|
--compress
|
||||||
echo "Bundle created: toot-`git describe`.pyz"
|
echo "Bundle created: toot-`git describe`.pyz"
|
||||||
|
|
||||||
|
|
||||||
|
# TODO: add more rules for more shells
|
||||||
|
.PHONY: install-shell-completion
|
||||||
|
install-shell-completion: install-bash-completion
|
||||||
|
@echo "See docs/shell_completion.md for Fish and Zsh completions"
|
||||||
|
|
||||||
|
.PHONY: install-bash-completion
|
||||||
|
install-bash-completion:
|
||||||
|
if test -d /etc/bash_completion.d; then \
|
||||||
|
$(MAKE) bash-completion && \
|
||||||
|
cp bash-completion /etc/bash_completion.d/toot; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
# TODO: encode dependencies instead (on bundle?)
|
||||||
|
.PHONY: bash-completion
|
||||||
|
bash-completion:
|
||||||
|
_TOOT_COMPLETE=bash_source toot > $@.tmp && mv -f $@.tmp $@
|
||||||
|
Loading…
Reference in New Issue
Block a user