Saturday, April 03, 2021

enable fish shell completion in sysutils/rclone

Hi,

this adds the completion for fish shell.

Index: Makefile
===================================================================
RCS file: /home/reposync/ports/sysutils/rclone/Makefile,v
retrieving revision 1.25
diff -u -p -r1.25 Makefile
--- Makefile 8 Mar 2021 19:09:25 -0000 1.25
+++ Makefile 3 Apr 2021 11:18:52 -0000
@@ -8,6 +8,7 @@ COMMENT = rsync for cloud storage
V = 1.54.1
DISTNAME = rclone-v${V}
PKGNAME = rclone-${V}
+REVISION = 0

CATEGORIES = sysutils

@@ -32,7 +33,7 @@ post-extract:
mv ${WRKDIR}/vendor ${WRKDIST}

post-build:
-.for s in bash zsh
+.for s in bash fish zsh
cd ${MODGO_WORKSPACE}/bin && \
HOME=${WRKSRC} ./rclone genautocomplete $s rclone.$s
.endfor
@@ -41,9 +42,12 @@ do-install:
${INSTALL_PROGRAM} ${MODGO_WORKSPACE}/bin/rclone ${PREFIX}/bin/
${INSTALL_MAN} ${WRKSRC}/rclone.1 ${PREFIX}/man/man1
${INSTALL_DATA_DIR} ${PREFIX}/share/bash-completion/completions/ \
+ ${PREFIX}/share/fish/vendor_completions.d/ \
${PREFIX}/share/zsh/vendor-completions/
${INSTALL_DATA} ${MODGO_WORKSPACE}/bin/rclone.bash \
${PREFIX}/share/bash-completion/completions/rclone
+ ${INSTALL_DATA} ${MODGO_WORKSPACE}/bin/rclone.fish \
+ ${PREFIX}/share/fish/vendor_completions.d/_rclone
${INSTALL_DATA} ${MODGO_WORKSPACE}/bin/rclone.zsh \
${PREFIX}/share/zsh/vendor-completions/_rclone

Index: pkg/PLIST
===================================================================
RCS file: /home/reposync/ports/sysutils/rclone/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- pkg/PLIST 9 Jul 2018 06:34:25 -0000 1.2
+++ pkg/PLIST 3 Apr 2021 11:18:17 -0000
@@ -4,6 +4,9 @@
share/bash-completion/
share/bash-completion/completions/
share/bash-completion/completions/rclone
+share/fish/
+share/fish/vendor_completions.d/
+share/fish/vendor_completions.d/_rclone
share/zsh/
share/zsh/vendor-completions/
share/zsh/vendor-completions/_rclone

No comments:

Post a Comment