Option to prioritize file name matches (#4192)

* 'pathname' is a new tiebreak option for prioritizing matches occurring
  in the file name of the path.

* `--scheme=path` will automatically set `--tiebreak=pathname,length`.

* fzf will automatically choose `path` scheme when the input is a TTY device,
  where fzf would start its built-in walker or run `$FZF_DEFAULT_COMMAND`
  which is usually a command for listing files.

Close #4191
This commit is contained in:
Junegunn Choi
2025-01-24 00:54:53 +09:00
committed by GitHub
parent c71e4ddee4
commit 243a76002c
7 changed files with 127 additions and 28 deletions

View File

@@ -188,6 +188,9 @@ func Run(opts *Options) (int, error) {
forward = false
case byBegin:
forward = true
case byPathname:
withPos = true
forward = false
}
}