mirror of
https://github.com/skywind3000/z.lua
synced 2026-03-21 23:29:48 +00:00
Updated FAQ (markdown)
17
FAQ.md
17
FAQ.md
@@ -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