summaryrefslogtreecommitdiff
path: root/bcachefs.c
diff options
context:
space:
mode:
authorZhai Can <bczhc0@126.com>2023-11-10 20:13:03 +0800
committerZhai Can <bczhc0@126.com>2023-11-10 21:20:01 +0800
commit1d1fe7b0b68719263ea31504e74c2b0f5ad2e053 (patch)
tree7679e8685b022b35371389f298aab6557bffa923 /bcachefs.c
parent61134a06fa714f32a405680d3515af94dfa11d2c (diff)
add command to generate Rust-part CLI completions
Diffstat (limited to 'bcachefs.c')
-rw-r--r--bcachefs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bcachefs.c b/bcachefs.c
index 827996f8..4efe29ed 100644
--- a/bcachefs.c
+++ b/bcachefs.c
@@ -97,6 +97,9 @@ static void usage(void)
" fusemount Mount a filesystem via FUSE\n"
"\n"
"Miscellaneous:\n"
+#ifndef BCACHEFS_NO_RUST
+ " completions Generate shell completions\n"
+#endif
" version Display the version of the invoked bcachefs tool\n");
}
@@ -273,6 +276,8 @@ int main(int argc, char *argv[])
#ifndef BCACHEFS_NO_RUST
if (!strcmp(cmd, "mount"))
return cmd_mount(argc, argv);
+ if (strstr(cmd, "completions"))
+ return cmd_completions(argc, argv);
#endif
#ifdef BCACHEFS_FUSE