-
-
Notifications
You must be signed in to change notification settings - Fork 150
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
Allow single line help messages #229
Comments
Related: #95 |
What's the argument? It looks better when surrounded by newlines. The bar for adding options is high. I doubt I would add an option for something as minor as this. |
I agree not an option, though I think it can be a little unintuitive that
I expected it to be
For example,
Perhaps if the provided help text has no newlines, it could be outputted without a leading newline. However, I do understand the argument for readibility with spacing and enforcing best practices on users. Feel free to close this. |
Maybe we could not indent it if it's a single line? That would make it look slightly nicer. |
I'd be okay with that. |
Ok. Let's do that. |
Should this extend to
Related, should the fact that
|
Yes |
@tommy-mitchell What do you think of removing the indent in |
@sindresorhus I kind of like how it looks, but I think a simple meow(`
Usage
$ foo [--bar]
`, {
importMeta: import.meta,
indent: false,
flags: {
// ...
},
}); Where /* @default 2 */
indent: number | false |
I also used to like it, but I'm seeing less value of it now for some reason. We can start with an option. We'll need that anyway if we decide to change the default in the future. Thanks. |
Currently, help messages always have surrounding newlines:
meow/index.js
Line 210 in dc0e33c
The user should be able to have a single line message (i.e. without a leading newline). This can either be an option or can be inferred if the provided help text has no newlines:
The text was updated successfully, but these errors were encountered: