diff options
| author | Chris Lu <chris.lu@uber.com> | 2019-03-23 11:54:26 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@uber.com> | 2019-03-23 11:54:26 -0700 |
| commit | bd1c0735e0bc3bf7a24ec948372b72a4a9652d03 (patch) | |
| tree | 0cd37c6688a45e0998f178e53185eea4004a7bca /weed/shell/shell_liner.go | |
| parent | 6b70b3610530d9b3637fd4179a0f2cecc5541fdd (diff) | |
| download | seaweedfs-bd1c0735e0bc3bf7a24ec948372b72a4a9652d03.tar.xz seaweedfs-bd1c0735e0bc3bf7a24ec948372b72a4a9652d03.zip | |
weed shell: adjust help text format
Diffstat (limited to 'weed/shell/shell_liner.go')
| -rw-r--r-- | weed/shell/shell_liner.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/weed/shell/shell_liner.go b/weed/shell/shell_liner.go index 7d09661dc..403980568 100644 --- a/weed/shell/shell_liner.go +++ b/weed/shell/shell_liner.go @@ -92,7 +92,8 @@ func printGenericHelp() { return strings.Compare(commands[i].Name(), commands[j].Name()) < 0 }) for _, c := range commands { - fmt.Printf("\t%s %s \n", c.Name(), c.Help()) + helpTexts := strings.SplitN(c.Help(), "\n", 2) + fmt.Printf(" %-30s\t# %s \n", c.Name(), helpTexts[0]) } } @@ -111,9 +112,7 @@ func printHelp(cmds []string) { for _, c := range commands { if c.Name() == cmd { - fmt.Println() - fmt.Printf("\t%s %s \n", c.Name(), c.Help()) - fmt.Println() + fmt.Printf(" %s\t# %s\n", c.Name(), c.Help()) } } } |
