fzf icon indicating copy to clipboard operation
fzf copied to clipboard

feature request: add a truely 'exact' match to extended search mode

Open cpakkala opened this issue 2 years ago • 3 comments

  • [x] I have read through the manual page (man fzf)
  • [x] I have the latest version of fzf
  • [x] I have searched through the existing issues

Info

  • OS
    • [x] Linux
    • [ ] Mac OS X
    • [ ] Windows
    • [ ] Etc.
  • Shell
    • [ ] bash
    • [x] zsh
    • [ ] fish

Problem / Steps to reproduce

You start any search in extended search mode with either case-insensative or smart-case (default). You type a word and then realize that your next search term needs to be case-sensitive. You then look at the extended search mode section of the man page and try to use a single quote before your search term, expecting it to be an "exact match". You soon discover that the manual's usage of the term "exact match" really only means "non-fuzzy", not exact. Exact should include case-sensitivity. I now have no other option but to restart fzf in case-sensitive mode.

Unless there's some other way to enforce the case-sensitivity dynamically (preferably by search term rather than for the entire fzf instance), I propose:

  1. rename "exact match" to "non-fuzzy match"
  2. add an actual "exact match" function that includes both "non-fuzzy match" and case-sensitivity.

cpakkala avatar Sep 13 '21 21:09 cpakkala

Just found #1755, which is related, but not 'exactly' the same as my issue. Resolving this issue though, would resolve #1755 as well.

cpakkala avatar Sep 14 '21 00:09 cpakkala

This breaks the syntax. I suggest adding a regex mode instead, where we can use modifiers like (?i) to change case-sensitivity.

NightMachinery avatar Oct 05 '21 08:10 NightMachinery

Is --exact +i working?

timsu92 avatar Aug 30 '22 08:08 timsu92