summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2025-01-24 00:54:53 +0900
committerGitHub <noreply@github.com>2025-01-24 00:54:53 +0900
commit243a76002c93b474cf8401b37670a43803a0a2d2 (patch)
treee0972774a3e45905b140c6d4affe370cbda04991 /man
parentc71e4ddee41d3381fb9ec25cc7078bdb25ac4b27 (diff)
downloadfzf-243a76002c93b474cf8401b37670a43803a0a2d2.tar.gz
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
Diffstat (limited to 'man')
-rw-r--r--man/man1/fzf.130
1 files changed, 20 insertions, 10 deletions
diff --git a/man/man1/fzf.1 b/man/man1/fzf.1
index 8df87277..b7e4ec6d 100644
--- a/man/man1/fzf.1
+++ b/man/man1/fzf.1
@@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
..
-.TH fzf 1 "Jan 2025" "fzf 0.58.0" "fzf - a command-line fuzzy finder"
+.TH fzf 1 "Jan 2025" "fzf 0.59.0" "fzf - a command-line fuzzy finder"
.SH NAME
fzf - a command-line fuzzy finder
@@ -76,7 +76,8 @@ Generic scoring scheme designed to work well with any type of input.
.RS
Additional bonus point is only given to the characters after path separator.
You might want to choose this scheme over \fBdefault\fR if you have many files
-with spaces in their paths.
+with spaces in their paths. This also sets \fB\-\-tiebreak=pathname,length\fR,
+to prioritize matches occurring in the tail element of a file path.
.RE
.RE
@@ -90,6 +91,13 @@ more weight to the chronological ordering. This also sets
.RE
.RE
+.RS
+fzf chooses \fBpath\fR scheme when the input is a TTY device, where fzf would
+start its built-in walker or run \fB$FZF_DEFAULT_COMMAND\fR, and there is no
+\fBreload\fR action bound to \fBstart\fR event. Otherwise, it chooses
+\fBdefault\fR scheme.
+.RE
+
.TP
.BI "\-\-algo=" TYPE
Fuzzy matching algorithm (default: v2)
@@ -140,15 +148,17 @@ Comma-separated list of sort criteria to apply when the scores are tied.
.br
.br
-.BR length " Prefers line with shorter length"
+.BR length " Prefers line with shorter length"
+.br
+.BR chunk " Prefers line with shorter matched chunk (delimited by whitespaces)"
.br
-.BR chunk " Prefers line with shorter matched chunk (delimited by whitespaces)"
+.BR pathname " Prefers line with matched substring in the file name of the path"
.br
-.BR begin " Prefers line with matched substring closer to the beginning"
+.BR begin " Prefers line with matched substring closer to the beginning"
.br
-.BR end " Prefers line with matched substring closer to the end"
+.BR end " Prefers line with matched substring closer to the end"
.br
-.BR index " Prefers line that appeared earlier in the input stream"
+.BR index " Prefers line that appeared earlier in the input stream"
.br
.br
@@ -1128,9 +1138,9 @@ Show man page
.SH ENVIRONMENT VARIABLES
.TP
.B FZF_DEFAULT_COMMAND
-Default command to use when input is tty. On *nix systems, fzf runs the command
-with \fB$SHELL \-c\fR if \fBSHELL\fR is set, otherwise with \fBsh \-c\fR, so in
-this case make sure that the command is POSIX-compliant.
+Default command to use when input is a TTY device. On *nix systems, fzf runs
+the command with \fB$SHELL \-c\fR if \fBSHELL\fR is set, otherwise with \fBsh
+\-c\fR, so in this case make sure that the command is POSIX-compliant.
.TP
.B FZF_DEFAULT_OPTS
Default options.