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

Add option to abbreviate home directory to ~ when searching #149

Merged
merged 1 commit into from
Mar 25, 2023
Merged

Add option to abbreviate home directory to ~ when searching #149

merged 1 commit into from
Mar 25, 2023

Conversation

d3dave
Copy link
Contributor

@d3dave d3dave commented Jan 8, 2021

WHAT

Adds a new boolean option (ENHANCD_FILTER_ABBREV) that controls abbreviation of the home directory prefix (determined by $HOME) to ~ when searching interactively. Implemented for both zsh and fish.

WHY

I most often search through paths under my home directory. As a result, I see a bunch of entries that all begin with /home/my_username:

/home/my_username/code/python/cpython/PC
/home/my_username/code/python/cpython/Parser
/home/my_username/code/python/cpython/Objects
/home/my_username/code/python/cpython/PCbuild
...

Enabling ENHANCD_FILTER_ABBREV reduces these to look a lot more concise and less cluttered, like this:

~/code/python/cpython/PC
~/code/python/cpython/Parser
~/code/python/cpython/Objects
~/code/python/cpython/PCbuild
...

@babarot
Copy link
Owner

babarot commented Mar 25, 2023

Thank you for adding new feature

@babarot babarot merged commit 6f5af00 into babarot:master Mar 25, 2023
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