diff --git a/cmd/list.go b/cmd/list.go index 4c38a96..1542d62 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -23,10 +23,12 @@ var ( listAll bool listCategory string listLimit int + listProjects bool ) func init() { listCmd.Flags().BoolVarP(&listAll, "all", "a", false, "Include archived workspaces") + listCmd.Flags().BoolVar(&listProjects, "projects", false, "Show projects instead of tasks") listCmd.Flags().StringVarP(&listCategory, "category", "c", "", "Filter by category") listCmd.Flags().IntVarP(&listLimit, "limit", "n", 20, "Maximum entries to show") rootCmd.AddCommand(listCmd) @@ -39,13 +41,18 @@ func runList(cmd *cobra.Command, args []string) error { IncludeArchived: listAll, Category: listCategory, Limit: listLimit, + Projects: listProjects, }) if err != nil { return err } if len(results) == 0 { - fmt.Println("No workspaces found.") + if listProjects { + fmt.Println("No projects found.") + } else { + fmt.Println("No tasks found.") + } return nil }