You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-7Lines changed: 13 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,11 +19,12 @@ For example, `z foo bar` would match `/foo/bar` but not `/bar/foo`.
19
19
-**10x** times faster than **fasd** and **autojump**, **3x** times faster than **z.sh**.
20
20
- Available for **posix shells**: bash, zsh, dash, sh, ash, ksh, busybox and etc.
21
21
- Available for Fish Shell, Power Shell and Windows cmd.
22
-
- Enhanced matching mode takes you to where ever you want precisely.
22
+
-[Enhanced matching algorithm](#enhanced-matching) takes you to where ever you want precisely.
23
23
- Allow updating database only if `$PWD` changed with "$_ZL_ADD_ONCE" set to 1.
24
24
- Interactive selection enables you to choose where to go before cd.
25
-
- Intergrated with FZF (optional) for interactive selection and bash completion.
25
+
- Intergrated with FZF (optional) for interactive selection and completion.
26
26
- Quickly go back to a parent directory instead of typing "cd ../../..".
27
+
- Cooperate with [fz](https://github.com/changyuheng/fz) to provide better completion, see [FAQ](https://github.com/skywind3000/z.lua/wiki/FAQ#fzsh-for-better-completion).
27
28
- Corresponding experience in different shells and operating systems.
28
29
- Compatible with Lua 5.1, 5.2 and 5.3+
29
30
- Self contained, distributed as a single `z.lua` script, no other dependence.
@@ -262,6 +263,7 @@ And then you can input the number and choose where to go before actual cd. eg. i
262
263
263
264
NOTE: for fish shell, this feature requires fish 2.7.0 or above.
264
265
266
+
265
267
## FZF Supports
266
268
267
269
From version 1.1.0, a new option `"-I"` will allow you to use fzf to select when there are multiple matches.
@@ -274,7 +276,7 @@ Of course, you can always give more keywords to `z` command to match your destin
274
276
275
277
Usually, `z -I` can be aliased to `zf` (z + fuzzy finder) for convenience. If there are only one path matched, `z -I` will jump to it directly, fzf will only be invoked for multiple matches.
276
278
277
-
`"z -I ."` or `"zf ."` can be used to use fzf select from entire database.
279
+
`"z -I ."` or `"zf ."` can be used to use fzf select from entire database. Environment variable `_ZL_FZF_FLAG` is for passing additional arguments to fzf, you can try to set it to `-e` to use `exact` matching mode in fzf.
278
280
279
281
NOTE: For fish shell, this feature requires fish 2.7.0 or above. You can specify fzf executable in `$_ZL_FZF` environment variable, `"fzf"` will be called by default.
280
282
@@ -338,10 +340,13 @@ Then press `<tab>` after `z xxx`:
338
340
339
341

340
342
341
-
With the help of fzf, completion in bash is much easier now.
343
+
With the help of fzf, completion in bash is much easier now.
344
+
345
+
`z.lua` can cooperate with [fz](https://github.com/changyuheng/fz) for **better completion** result in both bash and zsh, for more information see [FAQ](https://github.com/skywind3000/z.lua/wiki/FAQ#fzsh-for-better-completion).
342
346
343
347
NOTE: To enable this, command `fzf` must be found in `$PATH` before initialization.
344
348
349
+
345
350
## Most Recently Accessed Path
346
351
347
352
`z.lua` provides a fast way to visit MRU directories without typing any keyword. That is `dirstack`, which records recently visited paths and can be manipulated by `z -`, `z --` and `z -{num}`:
@@ -372,7 +377,7 @@ There is another way to access MRU directories interactively by utilizing parame
372
377
alias zh='z -I -t .'
373
378
```
374
379
375
-
The new alias `zh` (jump to history) uses a parameter `-t`to sort the result by time and `-I` to use `fzf` for selection. the result is:
380
+
The new alias `zh` (jump to history) is very easy to input:
376
381
377
382

378
383
@@ -389,8 +394,8 @@ Remember to enable the [enhanced matching](#enhanced-matching) algorithm, the cu
389
394
Recommended aliases you may find useful:
390
395
391
396
```bash
392
-
aliaszc='z -c'# restrict matches to subdirs of $PWD
393
-
aliaszz='z -i'# cd with interactive selection
397
+
aliaszz='z -c'# restrict matches to subdirs of $PWD
398
+
aliaszi='z -i'# cd with interactive selection
394
399
alias zf='z -I'# use fzf to select in multiple matches
395
400
alias zb='z -b'# quickly cd to the parent directory
0 commit comments