Skip to content

Commit c4a9376

Browse files
author
skywind3000
committed
update doc for 1.5.1
1 parent eea474d commit c4a9376

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

README.cn.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,26 @@ alias zh='z -I -t .'
341341

342342
第一列数据代表该路径多少秒以前访问过,第二列是路径名称。此时,你可以试着敲几个字母,用 fzf 的字符串模糊匹配进行定位,或者用光标键的上和下(CTRL+J/K 也可以)来上下移动,最后按回车 cd 过去,或者 ESC 放弃。
343343

344+
版本 `v1.5.1` 引入了模拟 "dir stack" 可以通过: `z -``z --``z -{num}` 来操作:
345+
346+
```bash
347+
# 显示当前的 dir stack
348+
$ z --
349+
0 /home/skywind/work/match/memory-match
350+
1 /home/skywind/.local/etc
351+
2 /home/skywind/software/vifm-0.9.1
352+
3 /home/skywind/work
353+
4 /home/skywind/work/match
354+
355+
# cd 到栈里 2 号路径
356+
$ z -2
357+
=> cd /home/skywind/software/vifm-0.9.1
358+
359+
# 弹出栈顶 (cd 到上一次的老路径),和 "z -0" 相同
360+
$ z -
361+
=> cd -
362+
```
363+
344364
注意:最好把增强匹配模式打开,这样查看历史路径时可以把当前路径过滤掉。
345365

346366
## Tips

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,11 +355,32 @@ The new alias `zh` (jump to history) uses a parameter `-t` to sort the result by
355355

356356
The first column indicates how many seconds ago you have visited, and the second column is the path name. With `zh`, you can type some character to use string matching in fzf, or use `<Up>`/`<Down>` (as well as `CTRL+j/k`) to move the selector (red `>`) up and down.
357357

358-
At last, press `<enter>` to accept or `<ESC>` to give up.
358+
At last, press `<enter>` to accept or `<ESC>` to give up.
359+
360+
Version `v1.5.1` has introduced a simulated "dir stack", which can be manipulated by `z -`, `z --` and `z -{num}`:
361+
362+
```bash
363+
# display current dir stack
364+
$ z --
365+
0 /home/skywind/work/match/memory-match
366+
1 /home/skywind/.local/etc
367+
2 /home/skywind/software/vifm-0.9.1
368+
3 /home/skywind/work
369+
4 /home/skywind/work/match
370+
371+
# cd to the 2nd directory in the stack
372+
$ z -2
373+
=> cd /home/skywind/software/vifm-0.9.1
374+
375+
# popup stacktop (cd to previous directory), same as "z -0"
376+
$ z -
377+
=> cd -
378+
```
359379

360380
Remember to enable the [enhanced matching](#enhanced-matching) algorithm, the current working directory can be skipped with it.
361381

362382

383+
363384
## Tips
364385

365386
Recommended aliases you may find useful:
@@ -427,6 +448,7 @@ As you see, z.lua is the fastest one and requires less resource.
427448

428449
## History
429450

451+
- 1.5.1 (2019-02-15): new: simulated dir stack by `z -`, `z --` and `z -{num}`.
430452
- 1.5.0 (2019-02-14): fixed minor issues in backward jumping.
431453
- 1.4.7 (2019-02-13): Don't use regex in backward jumping (use plain text instead).
432454
- 1.4.6 (2019-02-12): change: `_ZL_EXCLUDE_DIRS` to a comma separated list of dirs to exclude.

0 commit comments

Comments
 (0)