Skip to content

Commit 6e330ab

Browse files
author
skywind3000
committed
update doc for dirstack
1 parent 1c9c5eb commit 6e330ab

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

README.cn.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ alias zh='z -I -t .'
341341

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

344-
版本 `v1.5.1` 引入了模拟 "dir stack" 可以通过: `z -``z --``z -{num}` 来操作:
344+
版本 `v1.5.1` 引入了模拟 `dirstack` 可以通过: `z -``z --``z -{num}` 来操作
345345

346346
```bash
347347
# 显示当前的 dir stack
@@ -361,8 +361,11 @@ $ z -
361361
=> cd -
362362
```
363363

364+
这个 `dirstack` 是根据 z.lua 的路径历史数据库计算的出来的,所以和具体的 shell 或者操作系统都没有关系。你退出再登陆不会丢失这些路径历史,不同的 shell 之间也可以共享同一份历史数据。
365+
364366
注意:最好把增强匹配模式打开,这样查看历史路径时可以把当前路径过滤掉。
365367

368+
366369
## Tips
367370

368371
推荐一些常用的命令别名:

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ The first column indicates how many seconds ago you have visited, and the second
357357

358358
At last, press `<enter>` to accept or `<ESC>` to give up.
359359

360-
Version `v1.5.1` has introduced a simulated "dir stack", which can be manipulated by `z -`, `z --` and `z -{num}`:
360+
Version `v1.5.1` has introduced a simulated "dirstack", which can be manipulated by `z -`, `z --` and `z -{num}`:
361361

362362
```bash
363363
# display current dir stack
@@ -377,6 +377,8 @@ $ z -
377377
=> cd -
378378
```
379379

380+
The dirstack is calculated from z.lua's database, and has no dependency on shells or systems. You will not lost records after re-login, and history can be shared across shells and sessions.
381+
380382
Remember to enable the [enhanced matching](#enhanced-matching) algorithm, the current working directory can be skipped with it.
381383

382384

0 commit comments

Comments
 (0)