Sort issues by ID when showing multiple issues

When bd show displays multiple issues, they are now sorted by ID
for consistent and predictable ordering:
- bd show bd-7 bd-5 bd-6 displays them as bd-5, bd-6, bd-7
- Works with explicit IDs, --all-issues, and --priority flags
- Applies to both text and JSON output
- Uses alphabetical sorting which works for typical ID formats

This makes the output easier to read and more predictable,
especially when showing many issues at once.
This commit is contained in:
Claude Code
2025-10-24 09:52:42 +00:00
committed by Steve Yegge
parent 3b8d13f100
commit 1ea936d7c3

View File

@@ -1831,6 +1831,12 @@ Examples:
// Use provided IDs
issueIDs = args
}
// Sort issue IDs for consistent ordering when showing multiple issues
if len(issueIDs) > 1 {
sort.Strings(issueIDs)
}
// If daemon is running, use RPC
if daemonClient != nil {
allDetails := []interface{}{}