-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
oc in windows: cli help wraps awkwardly in default windows console #5336
Comments
@liggitt please tag and assign to me. |
Was looking into this issue, help messages are created with raw string literals and printing even the newlines in it which doesn't really supports any escape chars in it. So I'm wondering what is best solution here?
|
Note that this doesn't happen only on Windows, it's just worse because the default wide is lower. But if you resize your terminal window on Linux to a smaller size, at some point it becomes reproducible. I don't think we would move away from using raw string literals. We should just change how we build them. For example, in the default explain output of Paragraphs should just be a long string line without additional line breaks, and the terminal would be responsible to wrap it according to the windows size. If we still want to limit the max size to avoid really wide content if your terminal is very large, we should do it globally and dynamically with something that detects the usable screen width and is responsible for wrapping when char width is larger than the max. We did that in past for |
For reference, here's how we did it in https://github.com/openshift/rhc/blob/master/lib/rhc/cli.rb#L16-L24 |
@juanvallejo FYI |
Looks doable, there are a few strategies in Go: |
Fixed in #10993 |
Although you can change the layout of a windows console, the default is 80 chars wide. With this default, the help and examples for most oc cli commands wrap awkwardly (here's part of oc --help):
The text was updated successfully, but these errors were encountered: