mirror of
https://github.com/skywind3000/z.lua
synced 2026-03-18 13:49:50 +00:00
update doc
This commit is contained in:
@@ -289,8 +289,6 @@ PS:你可以使用 `$_ZL_FZF` 环境变量来精确指明 fzf 的可执行路
|
||||
|
||||
向后跳转同样也支持环境变量 `$_ZL_ECHO`(用来显示跳转结果),这样可以搭配其他工具,在目标目录内执行命令,而并不需要改变当前工作目录(比如:``ls `zb git` ``)。
|
||||
|
||||
**Bonus**:`zb ..` 相当于 `cd ..`,`zb ...` 相当于 `cd ../..`,而 `zb ....` 相当于 `cd ../../..` 等等。 最后 `zb ..20` 等同于调用 `cd ..` 二十次。
|
||||
|
||||
环境变量 `$_ZL_ROOT_MARKERS` 是一个逗号分隔的列表,用来识别项目根目录,可以重定义成:
|
||||
|
||||
|
||||
@@ -300,6 +298,8 @@ export _ZL_ROOT_MARKERS=".git,.svn,.hg,.root,package.json"
|
||||
|
||||
这样在用 `zb` 时,可以回到包含 `.root`文件,或者 `package.json` 文件的父目录。
|
||||
|
||||
**Bonus**:`zb ..` 相当于 `cd ..`,`zb ...` 相当于 `cd ../..`,而 `zb ....` 相当于 `cd ../../..` 等等。 最后 `zb ..20` 等同于调用 `cd ..` 二十次。
|
||||
|
||||
|
||||
## 补全功能
|
||||
|
||||
|
||||
@@ -308,9 +308,6 @@ Let's start by aliasing `z -b` to `zb`:
|
||||
|
||||
Backward jumping can also be used with `$_ZL_ECHO` option (echo $PWD after cd), which makes it possible to combine them with other tools without actually changing the working directory (eg. ``ls `zb git` ``).
|
||||
|
||||
|
||||
**Bonus**: `zb ..` equals to `cd ..`, `zb ...` equals to `cd ../..` and `zb ....` equals to `cd ../../..`, and so on. Finally, `zb ..20` equals to `cd (..)x20`.
|
||||
|
||||
Environment variable `$_ZL_ROOT_MARKERS` is a comma separated list for project root locating, and can be redefined as:
|
||||
|
||||
```bash
|
||||
@@ -319,6 +316,8 @@ export _ZL_ROOT_MARKERS=".git,.svn,.hg,.root,package.json"
|
||||
|
||||
If you want `zb` jump back to a parent directory contains a `.root` or `package.json` in it.
|
||||
|
||||
**Bonus**: `zb ..` equals to `cd ..`, `zb ...` equals to `cd ../..` and `zb ....` equals to `cd ../../..`, and so on. Finally, `zb ..20` equals to `cd (..)x20`.
|
||||
|
||||
|
||||
## Completion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user