Skip to content

Commit 453cd40

Browse files
author
skywind3000
committed
simplify doc
1 parent 464a8ed commit 453cd40

File tree

2 files changed

+2
-40
lines changed

2 files changed

+2
-40
lines changed

README.cn.md

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -287,27 +287,7 @@ PS:你可以使用 `$_ZL_FZF` 环境变量来精确指明 fzf 的可执行路
287287
=> cd ~/github/ghost/test
288288
```
289289

290-
向后跳转同样也支持环境变量 `$_ZL_ECHO`(用来显示跳转结果),这样为搭配其他工具提供了可能性(并不需要改变当前工作目录):
291-
292-
293-
```bash
294-
# 假设我们位于 ~/github/vim/src/libvterm
295-
# 打开 $_ZL_ECHO 用于在每次跳转后调用一次 pwd 显示当前目录
296-
$ _ZL_ECHO=1
297-
298-
# 看看我项目根目录(有 .git 那个)目录里有什么?
299-
$ ls -l `zb`
300-
=> ls -l ~/github/vim
301-
302-
# 检查 "<项目根目录>/logs" 下面的日志
303-
$ tail -f `zb`/logs/error.log
304-
=> tail -f ~/github/vim/logs/error.log
305-
306-
# 查看一下某一级父目录里有些啥
307-
$ ls -l `zb git`
308-
=> ls -l ~/github
309-
310-
```
290+
向后跳转同样也支持环境变量 `$_ZL_ECHO`(用来显示跳转结果),这样可以搭配其他工具,在目标目录内执行命令,而并不需要改变当前工作目录(比如:``ls `zb git` ``)。
311291

312292
**Bonus**`zb ..` 相当于 `cd ..``zb ...` 相当于 `cd ../..`,而 `zb ....` 相当于 `cd ../../..` 等等。 最后 `zb ..20` 等同于调用 `cd ..` 二十次。
313293

README.md

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -306,26 +306,8 @@ Let's start by aliasing `z -b` to `zb`:
306306
=> cd ~/github/ghost/test
307307
```
308308

309-
Backward jumping can also be used with `$_ZL_ECHO` option (echo $pwd), which makes it possible to combine them with other tools (without actually changing the working directory):
309+
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` ``).
310310

311-
```bash
312-
# Assuming we are in ~/github/vim/src/libvterm
313-
# Enable $_ZL_ECHO to emit a pwd command after cd
314-
$ _ZL_ECHO=1
315-
316-
# see what's in my project root
317-
$ ls -l `zb`
318-
=> ls -l ~/github/vim
319-
320-
# check log in "<project root>/logs"
321-
$ tail -f `zb`/logs/error.log
322-
=> tail -f ~/github/vim/logs/error.log
323-
324-
# list some parent directory
325-
$ ls -l `zb git`
326-
=> ls -l ~/github
327-
328-
```
329311

330312
**Bonus**: `zb ..` equals to `cd ..`, `zb ...` equals to `cd ../..` and `zb ....` equals to `cd ../../..`, and so on. Finally, `zb ..20` equals to `cd (..)x20`.
331313

0 commit comments

Comments
 (0)