Skip to content

Commit

Permalink
robo(1): add --quiet option
Browse files Browse the repository at this point in the history
The option renders the task names only, allows users to implement scripting
easily with robo.

Closes #46.
  • Loading branch information
yields committed Sep 19, 2020
1 parent a0a423d commit 8d02f15
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var version = "0.6.0"

const usage = `
Usage:
robo [--config file]
robo [-q] [--config file]
robo <task> [<arg>...] [--config file]
robo help [<task>] [--config file]
robo variables [--config file]
Expand All @@ -23,6 +23,7 @@ const usage = `
-c, --config file config file to load [default: robo.yml]
-h, --help output help information
-v, --version output version
-q, --quiet output task names only
Examples:
Expand Down Expand Up @@ -62,6 +63,11 @@ func main() {
default:
if name, ok := args["<task>"].(string); ok {
cli.Run(c, name, args["<arg>"].([]string))
return
}

if args["--quiet"].(bool) {
cli.ListNames(c)
} else {
cli.List(c)
}
Expand Down

0 comments on commit 8d02f15

Please sign in to comment.