Improve tea time
#319
|
@ -5,6 +5,7 @@
|
|||
package times
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
|
@ -52,6 +53,12 @@ Depending on your permissions on the repository, only your own tracked times mig
|
|||
Aliases: []string{"m"},
|
||||
Usage: "Show Print the total duration at the end",
|
||||
noerw marked this conversation as resolved
Outdated
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "fields",
|
||||
Usage: fmt.Sprintf(`Comma-separated list of fields to print. Available values:
|
||||
%s
|
||||
`, strings.Join(print.TrackedTimeFields, ",")),
|
||||
},
|
||||
}, flags.AllDefaultFlags...),
|
||||
}
|
||||
|
||||
|
@ -107,6 +114,12 @@ func RunTimesList(cmd *cli.Context) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if ctx.IsSet("fields") {
|
||||
if fields, err = flags.GetFields(cmd, print.TrackedTimeFields); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
print.TrackedTimesList(times, ctx.Output, fields, ctx.Bool("total"))
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user
cp issue ;)