Skip to content

Commit

Permalink
docs(cmd): cleanup docs, fix output not being colorized
Browse files Browse the repository at this point in the history
  • Loading branch information
b5 committed Jun 15, 2018
1 parent 49568e0 commit 52c1d9e
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 32 deletions.
2 changes: 1 addition & 1 deletion cmd/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ changes to qri.`,
Example: ` add a new dataset named annual_pop:
$ qri add --data data.csv me/annual_pop
create a dataset with a dataset data file:
create a dataset with a dataset data file:
$ qri add --file dataset.yaml --data comics.csv me/comic_characters`,
Run: func(cmd *cobra.Command, args []string) {
ExitIfErr(o.Complete(f))
Expand Down
22 changes: 11 additions & 11 deletions cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ func NewConfigCommand(f Factory, ioStreams IOStreams) *cobra.Command {
"group": "other",
},
Long: `
config encapsulates all settings that control the behaviour of qri.
This includes all kinds of stuff: your profile details; enabling & disabling
different services; what kind of output qri logs to;
which ports on qri serves on; etc.
config encapsulates all settings that control the behaviour of qri.
This includes all kinds of stuff: your profile details; enabling & disabling
different services; what kind of output qri logs to;
which ports on qri serves on; etc.
Configuration is stored as a .yaml file kept at $QRI_PATH, or provided at CLI
runtime via command a line argument.`,
Configuration is stored as a .yaml file kept at $QRI_PATH, or provided at CLI
runtime via command a line argument.`,
Example: ` # get your profile information
$ qri config get profile
$ qri config get profile
# set your api port to 4444
$ qri config set api.port 4444
# set your api port to 4444
$ qri config set api.port 4444
# disable rpc connections:
$ qri config set rpc.enabled false`,
# disable rpc connections:
$ qri config set rpc.enabled false`,
}

get := &cobra.Command{
Expand Down
2 changes: 1 addition & 1 deletion cmd/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ created the version) and a message explaining what changed. Log prints these
details in order of occurrence, starting with the most recent known version,
working backwards in time.`,
Example: ` show log for the dataset b5/precip:
$ qri log b5/precip`,
$ qri log b5/precip`,
Annotations: map[string]string{
"group": "dataset",
},
Expand Down
12 changes: 6 additions & 6 deletions cmd/qri.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ func NewQriCommand(pf PathFactory, in io.Reader, out, err io.Writer) *cobra.Comm
Use: "qri",
Short: "qri GDVCS CLI",
Long: `
qri ("query") is a global dataset version control system
on the distributed web.
qri ("query") is a global dataset version control system
on the distributed web.
https://qri.io
https://qri.io
Feedback, questions, bug reports, and contributions are welcome!
https://github.com/qri-io/qri/issues`,
Feedback, questions, bug reports, and contributions are welcome!
https://github.com/qri-io/qri/issues`,
}

ioStreams := IOStreams{In: in, Out: out, ErrOut: err}
Expand Down Expand Up @@ -116,7 +116,7 @@ func (o *QriOptions) init() (err error) {
return
}
o.config = core.Config
setNoColor(o.config.CLI.ColorizeOutput || o.NoColor)
setNoColor(!o.config.CLI.ColorizeOutput || o.NoColor)

addr := fmt.Sprintf(":%d", o.config.RPC.Port)
if conn, err := net.Dial("tcp", addr); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cmd/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ $ qri config set registry.location ""`,
Use: "publish",
Short: "publish dataset info to the registry",
Example: ` Publish a dataset you've created to the registry:
$ qri registry publish me/dataset_name`,
$ qri registry publish me/dataset_name`,
Args: cobra.MinimumNArgs(1),
Run: func(cmd *cobra.Command, args []string) {
ExitIfErr(o.Complete(f, args))
Expand Down
2 changes: 1 addition & 1 deletion cmd/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This command is automatically run if you invoke any qri command without first
running setup. If setup has already been run, by default qri won’t let you
overwrite this info.`,
Example: ` run setup with a peername of your choosing:
$ qri setup --peername=your_great_peername`,
$ qri setup --peername=your_great_peername`,
Annotations: map[string]string{
"group": "other",
},
Expand Down
10 changes: 0 additions & 10 deletions cmd/tutorials_test.go

This file was deleted.

2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func NewVersionCommand(_ Factory, ioStreams IOStreams) *cobra.Command {
Use: "version",
Short: "print the version number",
Long: `qri uses semantic versioning.
For updates & further information check https://github.com/qri-io/qri/releases`,
For updates & further information check https://github.com/qri-io/qri/releases`,
Annotations: map[string]string{
"group": "other",
},
Expand Down

0 comments on commit 52c1d9e

Please sign in to comment.