Add "matching" to README

README was linking to #matching but was not defined.
Adapt content from man-page to README.
This commit is contained in:
Lapo Luchini 2021-07-19 09:53:14 +02:00 committed by GitHub
parent 20d9f3d18c
commit 75f675b794
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 0 deletions

View File

@ -243,6 +243,21 @@ Be sure to set these before calling `zoxide init`.
- When set to `1`, `z` will resolve symlinks before adding directories to the
database.
## Matching
zoxide uses a simple, predictable algorithm for resolving queries:
* All matching is case-insensitive.
`zoxide query foo` matches `/foo` as well as `/FOO`.
* All terms must be present (including slashes) within the path, in order.
`zoxide query fo ba` matches `/foo/bar`, but not `/bar/foo`.
`zoxide query fo / ba` matches `/foo/bar`, but not `/foobar`.
* The last component of the last keyword must match the last component of the path.
`zoxide query bar` matches `/foo/bar`, but not `/bar/foo`.
`zoxide query foo/bar` (last component: `bar`) matches `/foo/bar`, but not `/foo/bar/baz`.
* The path must exist. Deleted directories are filtered out.
* Matches are returned in descending order of **FRECENCY**.
## Third-party integrations
- [`nnn`][nnn] is a terminal file manager. You can use `zoxide` for navigation