feat(bead): add 'read' as alias for 'show' subcommand

Adds `gt bead read <id>` as an alias for `gt bead show <id>` to provide
an alternative verb that may feel more natural for viewing bead details.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
rictus
2026-01-20 20:37:17 -08:00
committed by beads/crew/emma
parent d0a1e165e5
commit cd347dfdf9

View File

@@ -57,10 +57,29 @@ Examples:
},
}
var beadReadCmd = &cobra.Command{
Use: "read <bead-id> [flags]",
Short: "Show details of a bead (alias for 'show')",
Long: `Displays the full details of a bead by ID.
This is an alias for 'gt bead show'. All bd show flags are supported.
Examples:
gt bead read gt-abc123 # Show a gastown issue
gt bead read hq-xyz789 # Show a town-level bead
gt bead read bd-def456 # Show a beads issue
gt bead read gt-abc123 --json # Output as JSON`,
DisableFlagParsing: true, // Pass all flags through to bd show
RunE: func(cmd *cobra.Command, args []string) error {
return runShow(cmd, args)
},
}
func init() {
beadMoveCmd.Flags().BoolVarP(&beadMoveDryRun, "dry-run", "n", false, "Show what would be done")
beadCmd.AddCommand(beadMoveCmd)
beadCmd.AddCommand(beadShowCmd)
beadCmd.AddCommand(beadReadCmd)
rootCmd.AddCommand(beadCmd)
}