Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

make completions and manpage as subcommands? #27

Open
chenrui333 opened this issue Jun 2, 2024 · 5 comments
Open

make completions and manpage as subcommands? #27

chenrui333 opened this issue Jun 2, 2024 · 5 comments

Comments

@chenrui333
Copy link

馃憢 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.

@orhun
Copy link
Owner

orhun commented Jun 2, 2024

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 馃惢

@chenrui333
Copy link
Author

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.

@orhun
Copy link
Owner

orhun commented Jun 3, 2024

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 馃憖

@chenrui333
Copy link
Author

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

@orhun
Copy link
Owner

orhun commented Jun 13, 2024

Can you send some links or share snippets from both approaches?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants