Skip to content

Commit

Permalink
Add zsh completions
Browse files Browse the repository at this point in the history
Fixes: containers#302

Signed-off-by: Daniel J Walsh <[email protected]>
  • Loading branch information
rhatdan committed Oct 15, 2024
1 parent d5b93d4 commit 75dfd10
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
12 changes: 5 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ PYTHON ?= $(shell command -v python3 python|head -n1)
DESTDIR ?= /
PATH := $(PATH):$(HOME)/.local/bin


default: help

help:
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "ramalama"
version = "0.0.17"
version = "0.0.18"
dependencies = [
"argcomplete",
"tqdm",
Expand Down
1 change: 1 addition & 0 deletions rpm/python-ramalama.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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}/*

Expand Down

0 comments on commit 75dfd10

Please sign in to comment.