Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

display more items and enter fullscreen #1075

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hellojukay
Copy link

implement #1074
image

Copy link

the-label-bot bot commented Mar 19, 2025

The Label Bot has predicted the following:

Category Value Confidence Applied Label

@sunny0826 sunny0826 self-requested a review March 22, 2025 00:19
Copy link

codecov bot commented Mar 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 20.03%. Comparing base (2e19ad2) to head (9eba29c).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1075      +/-   ##
==========================================
+ Coverage   19.81%   20.03%   +0.21%     
==========================================
  Files          21       21              
  Lines        2649     2656       +7     
==========================================
+ Hits          525      532       +7     
  Misses       2071     2071              
  Partials       53       53              
Flag Coverage Δ
unittests 20.03% <100.00%> (+0.21%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Owner

@sunny0826 sunny0826 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hellojukay Great job! Is it possible to add a flag to control the number of items displayed?

just like:

kubecm switch --items-size 6

@hellojukay
Copy link
Author

It looks like --ui-size is already supported, we just need to set a larger default value for the option, i have tested it , it works.

$ ./kubecm switch -h

Switch Kube Context interactively

Usage:
  kubecm switch [flags]
  kubecm switch [command]

Aliases:
  switch, s, sw

Examples:

# Switch Kube Context interactively
kubecm switch
# Quick switch Kube Context
kubecm switch dev


Available Commands:
  docs        Open document website

Flags:
  -h, --help   help for switch

Global Flags:
      --config string   path of kubeconfig (default "$HOME/.kube/config")
      --create          Create a new kubeconfig file if not exists
  -m, --mac-notify      enable to display Mac notification banner
  -s, --silence-table   enable/disable output of context table on successful config update
  -u, --ui-size int     number of list items to show in menu at once (default 10)

Use "kubecm switch [command] --help" for more information about a command.

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.

2 participants