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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add multiple and multiline help support #138

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Young-Flash
Copy link

hi, thanks for the great project. This PR add support for multiple and multiline help.

}
let help_prefix = format!("{} {}", "Help", i + 1);
let help_prefix_len = if self.help.len() > 1 {
help_prefix.len()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be changed to help_prefix.chars().count()?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, should this logic not read self.help.chars().count().max(4)? Perhaps I'm misunderstanding it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.help is Vec<String>, IMO the current logic of help_prefix_len is ok

@zesterer
Copy link
Owner

zesterer commented Mar 2, 2025

Thanks for the PR!

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

Successfully merging this pull request may close these issues.

2 participants