Skip to content

Commit

Permalink
Improve help text
Browse files Browse the repository at this point in the history
  • Loading branch information
tfogo committed Nov 15, 2017
1 parent b267d7b commit 1a7fa13
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions spread.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,27 @@ import (
func main() {
app := cli.NewApp()
app.Name = "spread"
app.Usage = "Run commands in subdirectories"
app.Usage = "Run scripts and commands in multiple directories at once. \n\nWEBSITE: \n\n github.com/tfogo/spread\n\nDESCRIPTION:\n\n Spread is designed to do one thing and do it well. It is a simpler alternative to GNU Parallel. Spread will run commands in sequence on each subdirectory. If any command in the sequence fails, the rest of the commands will not run. Therefore, you can run commands based on the exit code of previous commands. \n\nEXAMPLES: \n\n spread 'npm test' 'git push origin master'"
app.Version = "v1.0.1"
app.UsageText = "spread [global options] [your commands]"
app.HideHelp = true

app.Authors = []cli.Author{
cli.Author{
Name: "Tim Fogarty",
Email: "tim@tfogo.com",
},
}

app.Flags = []cli.Flag {
cli.StringFlag {
Name: "exclude, x",
Value: "",
Usage: "Glob of directories to exclude",
Usage: "glob of directories to exclude",
},
cli.BoolFlag {
Name: "help, h",
Usage: "show help",
},
}

Expand All @@ -29,6 +43,11 @@ func main() {
}

func action(c *cli.Context) error {
if c.Bool("help") {
cli.ShowAppHelp(c)
return nil
}

commands := c.Args()
exclude := c.String("exclude")

Expand Down

0 comments on commit 1a7fa13

Please sign in to comment.