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

Regex anchors don't work for filtering #2854

Open
wholegrainloaf opened this issue Aug 27, 2024 · 1 comment
Open

Regex anchors don't work for filtering #2854

wholegrainloaf opened this issue Aug 27, 2024 · 1 comment
Labels
AsDesigned Works as designed

Comments

@wholegrainloaf
Copy link

wholegrainloaf commented Aug 27, 2024




Describe the bug
When using ^ and $ regex anchors, the filtering no longer works and returns an empty list instead of actually matching on resource names.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a resource list
  2. Click on / to start filtering
  3. Enter a regex filter like ^fancyPants
  4. Expect to see resources with names that start with fancyPants, but actually nothing shows up.
  5. Enter a regex filter like fancyPants
  6. Resources with that substring in their name show up, including ones that start with it

Historical Documents
N/A

Expected behavior
Resources matching the regex should show up since the k9s docs say:

Regex2 supported

Screenshots
N/A

Versions (please complete the following information):

  • OS: OSX Sonoma 14.x.x
  • K9s: 0.32.5
  • K8s: 1.3x.x

Additional context
N/A

@derailed derailed added the AsDesigned Works as designed label Aug 28, 2024
@derailed
Copy link
Owner

Resource filtering in k9s is very generic. User may want to filter on name but also ips, nodes, etc... for a given resource.
The way search currently works is by flattening out rows and grepping on that.
RX anchors tho supported are not effective here given the current strategy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AsDesigned Works as designed
Projects
None yet
Development

No branches or pull requests

2 participants