Updated FAQ (markdown)

Linwei committed 2019-02-19 14:10:34 +08:00
1 parent 69b9261943
commit 94bbb772c5
1 file changed
+16 -1
+16 -1
@@ -14,4 +14,19 @@ antigen boundle skywind3000/z.lua
antigen boundle changyuheng/fz
function _z() { _zlua "$@"; }
```
```
## Use `z` as `cd`
Paste this script in your `.bashrc` / `.zshrc`:
```bash
function j() {
if [[ "$argv[1]" == "-"* ]]; then
z "$@"
else
cd "$@" 2> /dev/null || z "$@"
fi
}
```
When you are using `j xxx` it will first try `cd xxx` and then `z xxx` if cd failed.