From 453cd40ed1695334be1a590ddb4c8596233aff40 Mon Sep 17 00:00:00 2001 From: skywind3000 Date: Thu, 14 Feb 2019 16:36:34 +0800 Subject: [PATCH] simplify doc --- README.cn.md | 22 +--------------------- README.md | 20 +------------------- 2 files changed, 2 insertions(+), 40 deletions(-) diff --git a/README.cn.md b/README.cn.md index a0829d6..d6f41fc 100644 --- a/README.cn.md +++ b/README.cn.md @@ -287,27 +287,7 @@ PS:你可以使用 `$_ZL_FZF` 环境变量来精确指明 fzf 的可执行路 => cd ~/github/ghost/test ``` -向后跳转同样也支持环境变量 `$_ZL_ECHO`(用来显示跳转结果),这样为搭配其他工具提供了可能性(并不需要改变当前工作目录): - - -```bash -# 假设我们位于 ~/github/vim/src/libvterm -# 打开 $_ZL_ECHO 用于在每次跳转后调用一次 pwd 显示当前目录 -$ _ZL_ECHO=1 - -# 看看我项目根目录(有 .git 那个)目录里有什么? -$ ls -l `zb` - => ls -l ~/github/vim - -# 检查 "<项目根目录>/logs" 下面的日志 -$ tail -f `zb`/logs/error.log - => tail -f ~/github/vim/logs/error.log - -# 查看一下某一级父目录里有些啥 -$ ls -l `zb git` - => ls -l ~/github - -``` +向后跳转同样也支持环境变量 `$_ZL_ECHO`(用来显示跳转结果),这样可以搭配其他工具,在目标目录内执行命令,而并不需要改变当前工作目录(比如:``ls `zb git` ``)。 **Bonus**:`zb ..` 相当于 `cd ..`,`zb ...` 相当于 `cd ../..`,而 `zb ....` 相当于 `cd ../../..` 等等。 最后 `zb ..20` 等同于调用 `cd ..` 二十次。 diff --git a/README.md b/README.md index ac8fbb8..a133f5c 100644 --- a/README.md +++ b/README.md @@ -306,26 +306,8 @@ Let's start by aliasing `z -b` to `zb`: => cd ~/github/ghost/test ``` -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): +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` ``). -```bash -# Assuming we are in ~/github/vim/src/libvterm -# Enable $_ZL_ECHO to emit a pwd command after cd -$ _ZL_ECHO=1 - -# see what's in my project root -$ ls -l `zb` - => ls -l ~/github/vim - -# check log in "/logs" -$ tail -f `zb`/logs/error.log - => tail -f ~/github/vim/logs/error.log - -# list some parent directory -$ ls -l `zb git` - => ls -l ~/github - -``` **Bonus**: `zb ..` equals to `cd ..`, `zb ...` equals to `cd ../..` and `zb ....` equals to `cd ../../..`, and so on. Finally, `zb ..20` equals to `cd (..)x20`.