mirror of
https://github.com/skywind3000/z.lua
synced 2026-11-26 16:43:09 +00:00
Updated FAQ (markdown)
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.
|
||||
Reference in new issue
Block a user