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
Pretty the help text #10547
Pretty the help text #10547
Conversation
LGTM |
This looks much better, thanks :-) |
@phemmer ok done - everyone please give it a look. |
This modifies the "docker help" text so that it is no wider than 80 chars and each description fits on one line. This will also try to use ~ when possible Added a test to make sure we don't go over 80 chars again. Added a test to make sure we use ~ Applied rules/tests to all docker commands - not just main help text Closes moby#10214 Signed-off-by: Doug Davis <dug@us.ibm.com>
@@ -503,6 +504,10 @@ func Set(name, value string) error { | |||
// otherwise, the default values of all defined flags in the set. | |||
func (f *FlagSet) PrintDefaults() { | |||
writer := tabwriter.NewWriter(f.Out(), 20, 1, 3, ' ', 0) | |||
var home string | |||
if runtime.GOOS != "windows" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See https://github.com/ahmetalpbalkan/docker/blob/homedir-fix/utils/homedir.go
Which is part of #10358, unmerged so far unfortunately
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually don't want the HOME dir in general. On windows I want "home" to be "" because ~ wont' work on windows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM |
1 similar comment
LGTM |
Okay folks obviousy
|
@ahmetalpbalkan would using %HOME% work/help? |
@duglin not really. It's called %USERPROFILE%, though that's barely 1-2 chars shorter than my full c:\users\username path. I guess I'll try that. thanks. |
This modifies the "docker help" text so that it is no wider than 80 chars
and each description fits on one line.
Added a test to make sure we don't go over 80 chars again.
https://www.youtube.com/watch?v=Kmv3WlKa6U8
Closes #10214
Signed-off-by: Doug Davis dug@us.ibm.com