Skip to content

Warn when --sort-by is used that results may not be globally sorted#70

Merged
davidnortonjr merged 1 commit into
mainfrom
issue-68-sort-by-warning
Mar 29, 2026
Merged

Warn when --sort-by is used that results may not be globally sorted#70
davidnortonjr merged 1 commit into
mainfrom
issue-68-sort-by-warning

Conversation

@davidnortonjr

Copy link
Copy Markdown
Member

Summary

  • Adds a warning to stderr when --sort-by is passed, explaining that it only sorts within each context independently and may not produce the expected global ordering
  • Links to --sort-by support #29 for more context

Closes #68

Test plan

  • kubectl x get pods --sort-by=.metadata.name prints a warning to stderr
  • kubectl x get pods --sort-by .metadata.name (space-separated) prints a warning to stderr
  • Commands without --sort-by produce no warning

🤖 Generated with Claude Code

Closes #68

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@davidnortonjr davidnortonjr merged commit 8721b8a into main Mar 29, 2026
5 checks passed
@davidnortonjr davidnortonjr deleted the issue-68-sort-by-warning branch March 29, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--sort-by should output a warning

1 participant