1
0
mirror of https://github.com/go-task/task.git synced 2025-02-09 13:47:06 +02:00

add details flag for cli

This commit is contained in:
jaedle 2019-02-24 08:51:20 +01:00
parent 4fa983bde7
commit 13614fb3c4
2 changed files with 5 additions and 1 deletions

View File

@ -17,7 +17,7 @@ var (
version = "master"
)
const usage = `Usage: task [-ilfwvsd] [--init] [--list] [--force] [--watch] [--verbose] [--silent] [--dir] [--dry] [task...]
const usage = `Usage: task [-ilfwvsd] [--init] [--list] [--force] [--watch] [--verbose] [--silent] [--dir] [--dry] [--details] [task...]
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.
@ -56,6 +56,7 @@ func main() {
verbose bool
silent bool
dry bool
details bool
dir string
output string
)
@ -69,6 +70,7 @@ func main() {
pflag.BoolVarP(&verbose, "verbose", "v", false, "enables verbose mode")
pflag.BoolVarP(&silent, "silent", "s", false, "disables echoing")
pflag.BoolVar(&dry, "dry", false, "compiles and prints tasks in the order that they would be run, without executing them")
pflag.BoolVar(&details, "details", false, "show detailed description about a task if present")
pflag.StringVarP(&dir, "dir", "d", "", "sets directory of execution")
pflag.StringVarP(&output, "output", "o", "", "sets output style: [interleaved|group|prefixed]")
pflag.Parse()
@ -96,6 +98,7 @@ func main() {
Silent: silent,
Dir: dir,
Dry: dry,
Details: details,
Stdin: os.Stdin,
Stdout: os.Stdout,

View File

@ -36,6 +36,7 @@ type Executor struct {
Verbose bool
Silent bool
Dry bool
Details bool
Stdin io.Reader
Stdout io.Writer