Files
beads/cmd/bd/children.go
beads/crew/lydia 83e3c75635 fix(ci): resolve lint errors and test failures
- Fix errcheck: handle watcher.Close() and Set() return values
- Fix unparam: remove always-nil error from NewActivityWatcher
- Fix unparam: remove unused sinceTime param, delete dead code
- Fix version mismatch: update MCP __init__.py to 0.48.0
- Fix routing tests: change CWD so routing can find town root

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 20:50:59 -08:00

35 lines
966 B
Go

package main
import (
"github.com/spf13/cobra"
)
// childrenCmd lists child beads of a parent.
// This is a convenience alias for 'bd list --parent <id>'.
var childrenCmd = &cobra.Command{
Use: "children <parent-id>",
GroupID: "issues",
Short: "List child beads of a parent",
Long: `List all beads that are children of the specified parent bead.
This is a convenience alias for 'bd list --parent <id>'.
Examples:
bd children hq-abc123 # List children of hq-abc123
bd children hq-abc123 --json # List children in JSON format
bd children hq-abc123 --pretty # Show children in tree format`,
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
parentID := args[0]
// Set the parent flag on listCmd, run it, then reset
_ = listCmd.Flags().Set("parent", parentID)
defer func() { _ = listCmd.Flags().Set("parent", "") }()
listCmd.Run(listCmd, []string{})
},
}
func init() {
rootCmd.AddCommand(childrenCmd)
}