mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-27 13:27:50 +08:00
cmds/config: better help text
This commit is contained in:
parent
fc7c199d6a
commit
ef4480fe6d
@ -98,6 +98,8 @@ const shortHelpFormat = `USAGE:
|
||||
|
||||
{{.Indent}}{{template "usage" .}}
|
||||
{{if .Synopsis}}
|
||||
SYNOPSIS
|
||||
|
||||
{{.Synopsis}}
|
||||
{{end}}{{if .Description}}
|
||||
{{.Description}}
|
||||
|
||||
@ -21,17 +21,34 @@ type ConfigField struct {
|
||||
}
|
||||
|
||||
var configCmd = &cmds.Command{
|
||||
Description: "Get/set IPFS config values",
|
||||
Help: `Examples:
|
||||
|
||||
Get the value of the 'datastore.path' key:
|
||||
|
||||
ipfs config datastore.path
|
||||
|
||||
Set the value of the 'datastore.path' key:
|
||||
|
||||
ipfs config datastore.path ~/.go-ipfs/datastore
|
||||
Helptext: cmds.HelpText{
|
||||
Tagline: "get and set IPFS config values",
|
||||
Synopsis: `
|
||||
ipfs config <key> - Get value of <key>
|
||||
ipfs config <key> <value> - Set value of <key> to <value>
|
||||
ipfs config --show - Show config file
|
||||
ipfs config --edit - Edit config file in $EDITOR
|
||||
`,
|
||||
ShortDescription: `
|
||||
ipfs config controls configuration variables. It works like 'git config'.
|
||||
The configuration values are stored in a config file inside your IPFS
|
||||
repository.`,
|
||||
LongDescription: `
|
||||
ipfs config controls configuration variables. It works
|
||||
much like 'git config'. The configuration values are stored in a config
|
||||
file inside your IPFS repository.
|
||||
|
||||
EXAMPLES:
|
||||
|
||||
Get the value of the 'datastore.path' key:
|
||||
|
||||
ipfs config datastore.path
|
||||
|
||||
Set the value of the 'datastore.path' key:
|
||||
|
||||
ipfs config datastore.path ~/.go-ipfs/datastore
|
||||
`,
|
||||
},
|
||||
|
||||
Arguments: []cmds.Argument{
|
||||
cmds.StringArg("key", true, false, "The key of the config entry (e.g. \"Addresses.API\")"),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user