diff --git a/completed.go b/completed.go index 91c043a..b6ee4a6 100644 --- a/completed.go +++ b/completed.go @@ -18,6 +18,7 @@ func CompletedList(c *cli.Context) error { } projectColorHash := GenerateColorHash(projectIds, colorList) ex := Filter(c.String("filter")) + rawFilter := c.String("raw") var completed todoist.Completed @@ -39,11 +40,19 @@ func CompletedList(c *cli.Context) error { if !result { continue } + + itemText := "" + if rawFilter == "true" { + itemText = item.GetContent() + } else { + itemText = ContentFormat(item) + } + writer.Write([]string{ IdFormat(item), CompletedDateFormat(item.DateTime()), ProjectFormat(item.ProjectID, client.Store, projectColorHash, c), - ContentFormat(item), + itemText, }) } diff --git a/main.go b/main.go index 17c0c15..213cdef 100644 --- a/main.go +++ b/main.go @@ -87,6 +87,10 @@ func main() { Name: "reminder, r", Usage: "set reminder (only premium users)", } + rawFlag := cli.BoolFlag{ + Name: "raw", + Usage: "Show raw content, as you would see it when you edit.", + } app.Flags = []cli.Flag{ cli.BoolFlag{ @@ -226,6 +230,7 @@ func main() { Action: CompletedList, Flags: []cli.Flag{ filterFlag, + rawFlag, }, ArgsUsage: " ", },