1
0
mirror of https://github.com/go-task/task.git synced 2025-01-06 03:53:54 +02:00

Improve task command help text

This commit is contained in:
Sindre Røkenes Myren 2017-07-03 14:58:09 +02:00
parent 789a4c03df
commit 023a902f61

View File

@ -14,14 +14,14 @@ var (
version = "master"
)
func main() {
log.SetFlags(0)
const usage = `Usage: task [-ifw] [--init] [--force] [--watch] [task...]
pflag.Usage = func() {
fmt.Println(`task [target1 target2 ...]: Runs commands under targets like make.
Runs the specified task(s). Falls back to the "default" task if no task name
was specified, or lists all tasks if an unknown task name was specified.
Example: 'task hello' with the following 'Taskfile.yml' file will generate an
'output.txt' file with the content "hello".
Example: 'task hello' with the following 'Taskfile.yml' file will generate
an 'output.txt' file.
'''
hello:
cmds:
@ -30,7 +30,13 @@ hello:
generates:
- output.txt
'''
`)
`
func main() {
log.SetFlags(0)
pflag.Usage = func() {
fmt.Println(usage)
pflag.PrintDefaults()
}