From 99150a7c5ffb0f8deace277504a21efac6210262 Mon Sep 17 00:00:00 2001 From: skywind3000 Date: Mon, 11 Feb 2019 14:17:27 +0800 Subject: [PATCH] update doc --- README.cn.md | 9 +++++++++ README.md | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/README.cn.md b/README.cn.md index 2084ff3..993ccf5 100644 --- a/README.cn.md +++ b/README.cn.md @@ -311,6 +311,15 @@ $ ls -l `zb git` **Bonus**:`zb ..` 相当于 `cd ..`,`zb ...` 相当于 `cd ../..`,而 `zb ....` 相当于 `cd ../../..` 等等。 最后 `zb ..20` 等同于调用 `cd ..` 二十次。 +环境变量 `$_ZL_ROOT_MARKERS` 是一个逗号分隔的列表,用来识别项目根目录,可以重定义成: + + +```bash +export _ZL_ROOT_MARKERS=".git,.svn,.hg,.root,package.json" +``` + +这样在用 `zb` 时,可以回到包含 `.root`文件,或者 `package.json` 文件的父目录。 + ## 补全功能 diff --git a/README.md b/README.md index 5e45567..593f74f 100644 --- a/README.md +++ b/README.md @@ -329,6 +329,14 @@ $ ls -l `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 +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`. + ## Completion