1// SPDX-FileCopyrightText: Amolith <amolith@secluded.site>
2//
3// SPDX-License-Identifier: AGPL-3.0-or-later
4
5package note
6
7import (
8 "fmt"
9
10 "github.com/spf13/cobra"
11)
12
13// ListCmd lists notes. Exported for potential use by shortcuts.
14var ListCmd = &cobra.Command{
15 Use: "list",
16 Short: "List notes",
17 Long: `List notes from Lunatask.
18
19Note: Due to end-to-end encryption, note names and content
20are not available through the API. Only metadata is shown.`,
21 RunE: func(cmd *cobra.Command, _ []string) error {
22 // TODO: implement note listing
23 fmt.Fprintln(cmd.OutOrStdout(), "Note listing not yet implemented")
24
25 return nil
26 },
27}
28
29func init() {
30 ListCmd.Flags().StringP("notebook", "b", "", "Filter by notebook key")
31 ListCmd.Flags().Bool("json", false, "Output as JSON")
32
33 _ = ListCmd.RegisterFlagCompletionFunc("notebook", completeNotebooks)
34}