git: 4db302981c18 - main - devel/ruff: Add shell completions
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 19 Jun 2024 09:56:13 UTC
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=4db302981c185306fdefbf6c4d51edae95cc8c46
commit 4db302981c185306fdefbf6c4d51edae95cc8c46
Author: Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-06-19 09:39:01 +0000
Commit: Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-06-19 09:56:10 +0000
devel/ruff: Add shell completions
---
devel/ruff/Makefile | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/devel/ruff/Makefile b/devel/ruff/Makefile
index 5d78e7f6efac..cb7e238c9c0f 100644
--- a/devel/ruff/Makefile
+++ b/devel/ruff/Makefile
@@ -1,7 +1,7 @@
PORTNAME= ruff
DISTVERSIONPREFIX= v
DISTVERSION= 0.4.9
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= devel python
MAINTAINER= yuri@FreeBSD.org
@@ -28,7 +28,11 @@ PROGS= ruff \
ruff_dev \
ruff_python_formatter
-PLIST_FILES= ${PROGS:S/^/bin\//}
+PLIST_FILES= ${PROGS:S/^/bin\//} \
+ share/bash-completion/completions/ruff \
+ share/elvish/lib/ruff.elv \
+ share/fish/vendor_completions.d/ruff.fish \
+ share/zsh/site-functions/_ruff
PORTSCOUT= limit:^.*0\.0\.2[56789].* # don't report before 0.0.25x+
@@ -39,5 +43,14 @@ do-install:
${WRKDIR}/target/*/release/${p} \
${STAGEDIR}${PREFIX}/bin
.endfor
+ # generate shell completions
+ ${MKDIR} ${STAGEDIR}${PREFIX}/share/bash-completion/completions
+ ${WRKDIR}/target/*/release/${PORTNAME} generate-shell-completion bash > ${STAGEDIR}${PREFIX}/share/bash-completion/completions/${PORTNAME}
+ ${MKDIR} ${STAGEDIR}${PREFIX}/share/elvish/lib
+ ${WRKDIR}/target/*/release/${PORTNAME} generate-shell-completion elvish > ${STAGEDIR}${PREFIX}/share/elvish/lib/${PORTNAME}.elv
+ ${MKDIR} ${STAGEDIR}${PREFIX}/share/fish/vendor_completions.d
+ ${WRKDIR}/target/*/release/${PORTNAME} generate-shell-completion fish > ${STAGEDIR}${PREFIX}/share/fish/vendor_completions.d/${PORTNAME}.fish
+ ${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions
+ ${WRKDIR}/target/*/release/${PORTNAME} generate-shell-completion zsh > ${STAGEDIR}${PREFIX}/share/zsh/site-functions/_${PORTNAME}
.include <bsd.port.mk>