From 243a76002c93b474cf8401b37670a43803a0a2d2 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 24 Jan 2025 00:54:53 +0900 Subject: 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 --- src/core.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core.go') diff --git a/src/core.go b/src/core.go index b8851d79..71cf04da 100644 --- a/src/core.go +++ b/src/core.go @@ -188,6 +188,9 @@ func Run(opts *Options) (int, error) { forward = false case byBegin: forward = true + case byPathname: + withPos = true + forward = false } } -- cgit v1.2.3