Skip to content

Add support for case-sensitive queries#959

Open
rylwin wants to merge 1 commit into
ajeetdsouza:mainfrom
rylwin:rw/case-sensitive-option
Open

Add support for case-sensitive queries#959
rylwin wants to merge 1 commit into
ajeetdsouza:mainfrom
rylwin:rw/case-sensitive-option

Conversation

@rylwin

@rylwin rylwin commented Dec 22, 2024

Copy link
Copy Markdown

Add _ZO_CASE_SENSITIVITY env var to control whether queries should be performed in a case-sensitive manner, keeping the current behavior (case-insensitive) as the default.

Setting _ZO_CASE_SENSITIVITY=case-sensitive changes the query behavior to be case-sensitive.


I switched to zoxide a few months ago and have found it to be a much more robust tool than what I was using before. I also enjoy all of the integrations it has.

One thing I miss from my previous jump tool is case-sensitivity: I have some dirs that happen to have capitalization that I can use to get to exactly where I want to go, with a single character, as long as the search is case sensitive.

This PR adds case-sensitivity as an option. This could also lay the groundwork for a "smart case" variant (requested in #224)

Also, I've done minimal rust, so if anything here is not idiomatic / should be adjusted happy to make any changes.

@ajeetdsouza ajeetdsouza force-pushed the main branch 3 times, most recently from c770a05 to 3fe42e9 Compare January 8, 2025 23:06
Add _ZO_CASE_SENSITIVITY env var to control whether queries should be
performed in a case-sensitive manner, keeping the current behavior
(case-insensitive) as the default.

Setting _ZO_CASE_SENSITIVITY=case-sensitive changes the query behavior
to be case-sensitive.
@rylwin rylwin force-pushed the rw/case-sensitive-option branch from 3571c32 to 99d6827 Compare July 3, 2025 20:49
@rylwin

rylwin commented Jul 3, 2025

Copy link
Copy Markdown
Author

I've rebased this branch on top of latest main

@azaleacolburn azaleacolburn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks good to me!

@andy5995

andy5995 commented May 4, 2026

Copy link
Copy Markdown

I'd be very interested in this change. I've been using zoxide for about 6 weeks now (I heard about it on the Linux Cast youtube channel), and case insensitivity is the only thing I can think that I'd want to change. A very handy utility, thank you.

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.

3 participants