1
0
mirror of https://github.com/skywind3000/z.lua synced 2026-03-17 13:19:48 +00:00

update doc

This commit is contained in:
skywind3000
2019-02-02 06:52:17 +08:00
parent b20ae58a82
commit b013719a83
2 changed files with 6 additions and 6 deletions

View File

@@ -67,7 +67,7 @@ z -i foo # 就进入交互式选择模式,让你自己挑选去哪里(多
新建 `~/.config/fish/conf.d/z.fish` 文件,并包含如下代码:
lua /path/to/z.lua --init fish | source
source (lua /path/to/z.lua --init fish | psub)
Fish version `2.4.0` 或者以上版本都支持,还有一种初始化方法:
@@ -222,7 +222,7 @@ z.lua 提供两种路径匹配算法:
````bash
eval "$(lua /path/to/z.lua --init bash once enhanced)"
eval "$(lua /path/to/z.lua --init zsh once enhanced)"
lua /path/to/z.lua --init fish once enhanced | source
source (lua /path/to/z.lua --init fish once enhanced | psub)
````
将会同时启用增强匹配算法和 once 机制在一些比较慢的硬件下路由器cygwinmsys使用该机制将有效的提升性能。其实 autojump 在 zsh 下会使用类似 once 的机制,而 bash 下则和 z.sh 类似。
@@ -257,7 +257,7 @@ alias zz='z -i' # 使用交互式选择模式
```bash
zf() {
cd "$(z -l 2>&1 | fzf --height 40% --nth 2.. --reverse --inline-info +s --tac --query "${*##-*}" | sed 's/^[0-9,.]* *//')"
cd "$(z -l "$@" 2>&1 | fzf --height 40% --nth 2.. --reverse --inline-info +s --tac | sed 's/^[0-9,.]* *//')"
}
```

View File

@@ -70,7 +70,7 @@ z -i foo # cd with interactive selection
Create `~/.config/fish/conf.d/z.fish` with following code
lua /path/to/z.lua --init fish | source
source (lua /path/to/z.lua --init fish | psub)
Fish version `2.4.0` or above is required.
@@ -208,7 +208,7 @@ To enable this, you can set `$_ZL_ADD_ONCE` to `1` before init z.lua. Or you can
````bash
eval "$(lua /path/to/z.lua --init bash once)"
eval "$(lua /path/to/z.lua --init zsh once)"
lua /path/to/z.lua --init fish once | source
source (lua /path/to/z.lua --init fish | psub)
````
It could be much faster on slow hardware or Cygwin/MSYS.
@@ -241,7 +241,7 @@ And you can define a `zf` command to select history path with fzf:
```bash
zf() {
cd "$(z -l 2>&1 | fzf --height 40% --nth 2.. --reverse --inline-info +s --tac --query "${*##-*}" | sed 's/^[0-9,.]* *//')"
cd "$(z -l "$@" 2>&1 | fzf --height 40% --nth 2.. --reverse --inline-info +s --tac | sed 's/^[0-9,.]* *//')"
}
```