aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2024-06-19 09:39:01 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2024-06-19 09:56:10 +0000
commit4db302981c185306fdefbf6c4d51edae95cc8c46 (patch)
treeff5cbebf2f0603efe4e92ca22f9b922daa11d78b
parentfe8fe422e371dc2eed714be505997c1f26c25291 (diff)
downloadports-4db302981c185306fdefbf6c4d51edae95cc8c46.tar.gz
ports-4db302981c185306fdefbf6c4d51edae95cc8c46.zip
devel/ruff: Add shell completions
-rw-r--r--devel/ruff/Makefile17
1 files 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>