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

On a `Term error from Cmdliner, print a Hint about how to pass a space #1535

Merged
merged 2 commits into from
May 17, 2024

Conversation

hannesm
Copy link
Member

@hannesm hannesm commented May 10, 2024

See #1248 @samoht @patricoferris @pitag-ha

Of course, happy to improve the text. But since this is a pretty common issue, I'm happy to have such a hint.

console-hint

@hannesm
Copy link
Member Author

hannesm commented May 10, 2024

There's another way how to get it working: --hello='foo\ bar' (or the mentioned --hello='"foo bar"'). I'm undecided which one is easier to understand, and what the leading sentence should be. :)

@hannesm hannesm mentioned this pull request May 16, 2024
14 tasks
@palainp
Copy link
Member

palainp commented May 16, 2024

I prefer 'foo\ bar' but it seems easier to use double quotes in shell scripts, so LGTM :)

@hannesm
Copy link
Member Author

hannesm commented May 16, 2024

@palainp thanks. I updated the docstring. It now includes both options.

console-hint2

I put it in two lines to adhere to the 80 character limit.

@palainp
Copy link
Member

palainp commented May 16, 2024

Thank you !

@samoht
Copy link
Member

samoht commented May 17, 2024

I'm still not very satisfied we need to impose such a dance on the users. But this is a more general issue. This PR is a good change anyway :-) feel free to merge!

@hannesm hannesm merged commit 00374a0 into mirage:main May 17, 2024
3 checks passed
@hannesm hannesm deleted the qol-hint-space branch May 17, 2024 10:24
@hannesm
Copy link
Member Author

hannesm commented May 17, 2024

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.

None yet

3 participants