From 75dfd10d69252d69242c94bfcccb65a0ff191985 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 15 Oct 2024 14:39:38 -0400 Subject: [PATCH] Add zsh completions Fixes: https://github.com/containers/ramalama/issues/302 Signed-off-by: Daniel J Walsh --- Makefile | 12 +++++------- pyproject.toml | 2 +- rpm/python-ramalama.spec | 1 + 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 629fc07e..a4e72254 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ PYTHON ?= $(shell command -v python3 python|head -n1) DESTDIR ?= / PATH := $(PATH):$(HOME)/.local/bin + default: help help: @@ -43,10 +44,8 @@ install-completions: register-python-argcomplete --shell bash ramalama > $(DESTDIR)${SHAREDIR}/bash-completion/completions/ramalama install ${SELINUXOPT} -d -m 755 $(DESTDIR)${SHAREDIR}/fish/vendor_completions.d register-python-argcomplete --shell fish ramalama > $(DESTDIR)${SHAREDIR}/fish/vendor_completions.d/ramalama.fish - -# FIXME: not available on Centos 9 yet. -# install ${SELINUXOPT} -d -m 755 $(DESTDIR)${SHAREDIR}/zsh/site -# register-python-argcomplete --shell zsh ramalama > $(DESTDIR)${SHAREDIR}/zsh/site/_ramalama + install ${SELINUXOPT} -d -m 755 $(DESTDIR)${SHAREDIR}/zsh/site + register-python-argcomplete --shell zsh ramalama > $(DESTDIR)${SHAREDIR}/zsh/site/_ramalama .PHONY: install-shortnames: @@ -62,9 +61,8 @@ completions: mkdir -p build/completions/fish/vendor_completions.d register-python-argcomplete --shell fish ramalama > build/completions/fish/vendor_completions.d/ramalama.fish -# FIXME: not available on Centos 9 yet. -# mkdir -p build/completions/zsh/site -# register-python-argcomplete --shell zsh ramalama > build/completions/zsh/site/_ramalama + mkdir -p build/completions/zsh/site + register-python-argcomplete --shell zsh ramalama > build/completions/zsh/site/_ramalama .PHONY: install: docs completions diff --git a/pyproject.toml b/pyproject.toml index a556697e..2f95bd22 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "ramalama" -version = "0.0.17" +version = "0.0.18" dependencies = [ "argcomplete", "tqdm", diff --git a/rpm/python-ramalama.spec b/rpm/python-ramalama.spec index b5f0b92f..7d51606d 100644 --- a/rpm/python-ramalama.spec +++ b/rpm/python-ramalama.spec @@ -72,6 +72,7 @@ Provides: %{pypi_name} = %{version}-%{release} %{_mandir}/man1/%{pypi_name}* %{_datadir}/bash-completion/completions/%{pypi_name} %{_datadir}/fish/vendor_completions.d/%{pypi_name}.fish +%{_datadir}/zsh/site/_ramalama %dir %{python3_sitelib}/* %{python3_sitelib}/*