make completions and manpage as subcommands?
chenrui333 opened this issue ยท 5 comments
๐ right now, the cargo build generates flawz-completions and flawz-mapage, I wonder if it would be better to create subcommands as flawz completions
and flawz manpage
. Let me know if that makes sense.
Hello! ๐๐ผ Can you share your use-case ? Why using separate binaries isn't exactly convenient for you?
I'm happy to change this if there is a good reason for it ๐ป
it is technically the same, but I just feel like the binaries are not very user friendly (i see you have the similar setup in daktilo as well).
as I come from homebrew, the subcommands would ease the installation process as we do with other rust formulae. I think it would help with other package managers as well.
Let me know if that makes sense.
Yeah, definitely makes sense.
as I come from homebrew, the subcommands would ease the installation process as we do with other rust formulae.
Can you share an example of how you generate completions for Rust packages in Homebrew? I'm curious about how subcommand vs binary approach looks like ๐
we have some syntax sugar like generate_completions_from_executable
, you can see the code ref in brew repo
and basically it would just have command running completion subcmd and consume them into pre-defined completion dir respectively.
I can see argc and ast-grep are doing completions command thing
Can you send some links or share snippets from both approaches?