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

CARAPACE_MATCH doesn't ignore case on completion #1061

Open
2 of 12 tasks
houqp opened this issue Dec 26, 2024 · 2 comments
Open
2 of 12 tasks

CARAPACE_MATCH doesn't ignore case on completion #1061

houqp opened this issue Dec 26, 2024 · 2 comments
Labels
bug Something isn't working darwin fund Fundable with polar.sh zsh

Comments

@houqp
Copy link

houqp commented Dec 26, 2024

Current Behavior

when CARAPACE_MATCH is set to 1, trying to complete with pkill --signal a yields no result

Expected Behavior

when CARAPACE_MATCH is set to 1, trying to complete with pkill --signal a yields:

ABRT  -- Abnormal termination
ALRM  -- Virtual alarm clock

Steps To Reproduce

  1. set CARAPACE_MATCH to 1
  2. type pkill --signal a
  3. press tab to trigger completion

Version

1.0.7

OS

  • Darwin
  • Linux
  • Termux
  • Windows

Shell

  • Bash
  • Elvish
  • Fish
  • Nushell
  • Oil
  • Powershell
  • Xonsh
  • Zsh

Anything else?

Not the root cause of this since the example uses prefix for completion, but there seems be to another bug in the relevant code file:

strings.EqualFold(s, t)
. We are not returning the result from strings.EqualFold when CASE_INSENSITIVE is enabled.

Polar

Fund with Polar
@houqp houqp added bug Something isn't working fund Fundable with polar.sh labels Dec 26, 2024
@rsteube
Copy link
Member

rsteube commented Dec 26, 2024

You also need to configure your shell for case insensitive matching: https://superuser.com/a/1092328 .
Otherwise it filters out the the values provided by carapace.
(i should add documentation for that)

@houqp
Copy link
Author

houqp commented Dec 27, 2024

Thanks for the quick response, can confirm this fixes my issue 👍 Agreed that it would be very helpful to add this to the doc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working darwin fund Fundable with polar.sh zsh
Projects
None yet
Development

No branches or pull requests

2 participants