commit:     9fcf8cd3f5626832fe5a4b01e6a1152f7618f2fe
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Wed Mar  6 12:27:40 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Mar  6 12:30:38 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9fcf8cd3

sys-fs/bcachefs-tools: install shell completions

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 ...hefs-tools-1.6.4.ebuild => bcachefs-tools-1.6.4-r1.ebuild} | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/sys-fs/bcachefs-tools/bcachefs-tools-1.6.4.ebuild 
b/sys-fs/bcachefs-tools/bcachefs-tools-1.6.4-r1.ebuild
similarity index 94%
rename from sys-fs/bcachefs-tools/bcachefs-tools-1.6.4.ebuild
rename to sys-fs/bcachefs-tools/bcachefs-tools-1.6.4-r1.ebuild
index 446b689da95e..09617302a1b5 100644
--- a/sys-fs/bcachefs-tools/bcachefs-tools-1.6.4.ebuild
+++ b/sys-fs/bcachefs-tools/bcachefs-tools-1.6.4-r1.ebuild
@@ -95,7 +95,7 @@ CRATES="
 LLVM_COMPAT=( {16..17} )
 PYTHON_COMPAT=( python3_{10..12} )
 
-inherit cargo flag-o-matic llvm-r1 multiprocessing python-any-r1 
toolchain-funcs unpacker
+inherit cargo flag-o-matic llvm-r1 multiprocessing python-any-r1 
shell-completion toolchain-funcs unpacker
 
 DESCRIPTION="Tools for bcachefs"
 HOMEPAGE="https://bcachefs.org/";
@@ -192,6 +192,11 @@ src_compile() {
        default
 
        use test && emake tests
+
+       local shell
+       for shell in bash fish zsh; do
+               ./bcachefs completions ${shell} > ${shell}.completion || die
+       done
 }
 
 src_test() {
@@ -230,6 +235,10 @@ src_install() {
                dosym bcachefs /sbin/mount.fuse.bcachefs
        fi
 
+       newbashcomp bash.completion bcachefs
+       newfishcomp fish.completion bcachefs.fish
+       newzshcomp zsh.completion _bcachefs
+
        doman bcachefs.8
 }
 

Reply via email to