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

Make fzf --exact optional #232

Closed
itmecho opened this issue Mar 12, 2020 · 2 comments · Fixed by #235
Closed

Make fzf --exact optional #232

itmecho opened this issue Mar 12, 2020 · 2 comments · Fixed by #235
Labels
new feature New feature or request

Comments

@itmecho
Copy link
Contributor

itmecho commented Mar 12, 2020

Is your feature request related to a problem? Please describe.
It would be great to be able to choose not to invoke fzf with the --exact option as this disables the fuzzy finding capabilities which are extremely useful.

"--exact",

Describe the solution you'd like
Don't invoke fzf with --exact by default. I think this is something that people can add with --fzf-overrides.

Describe alternatives you've considered
If you don't want to change the default behaviour, it could be a flag along the lines of --fzf-fuzzy-enable or something.

@itmecho itmecho added the new feature New feature or request label Mar 12, 2020
@denisidoro
Copy link
Owner

Hi, you can use navi --fzf-overrides ' --no-exact' for that purpose. Please let me know it that works out for you.

@itmecho
Copy link
Contributor Author

itmecho commented Mar 12, 2020

Ah yea, that works! I was trying that with the environment variable but it wasn't working:

# This didn't work
FZF_DEFAULT_OPTS=" --no-exact" navi --print

# Neither did this
export FZF_DEFAULT_OPTS=" --no-exact"
navi --print

# but your suggestion of the override flag does work
navi --print --fzf-overrides ' --no-exact'

Am I using the environment variable incorrectly or is it just not working properly? I'd like to set it in my .zshrc =]

denisidoro added a commit that referenced this issue Mar 12, 2020
`$FZF_DEFAULT_OPTS` won't work in some use cases because it has lower precedence then hardcoded settings such as `--exact`.

Usage:
```
export NAVI_FZF_OVERRIDES=" --no-exact"
navi
```

Fixes #232
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants