mirror of
https://github.com/skywind3000/z.lua
synced 2026-04-19 13:21:27 +00:00
Updated FAQ (markdown)
36
FAQ.md
36
FAQ.md
@@ -1,3 +1,20 @@
|
||||
## How to input a hyphen `-` in the keyword ?
|
||||
|
||||
Q: There is a `~/Documents/github/vue-my-ui` directory, but when I use `z vue-my-ui` the directory cannot be matched.
|
||||
|
||||
A: `-` is a reserved character in lua regexp. you can use either `z vue%-my%-ui` or `z vue my ui`.
|
||||
|
||||
## How to integrate z.lua to ranger ?
|
||||
|
||||
Copy [ranger_zlua.py](https://github.com/skywind3000/z.lua/blob/master/ranger_zlua.py) to your `~/.config/ranger/plugins` folder, and set environment variable in your shell rc:
|
||||
|
||||
```bash
|
||||
export RANGER_ZLUA="/path/to/z.lua"
|
||||
```
|
||||
|
||||
The integration script provides a `z` command in ranger. It also tracks directories changes in ranger.
|
||||
|
||||
|
||||
## How to use `z` as `cd` ?
|
||||
|
||||
Paste this script in your `.bashrc` / `.zshrc`:
|
||||
@@ -63,22 +80,3 @@ function zii() {
|
||||
[ -n "$dir" ] && cd "$dir"
|
||||
}
|
||||
```
|
||||
|
||||
## How to input a hyphen `-` in the keyword ?
|
||||
|
||||
Q: There is a `~/Documents/github/vue-my-ui` directory, but when I use `z vue-my-ui` the directory cannot be matched.
|
||||
|
||||
A: `-` is a reserved character in lua regexp. you can use either `z vue%-my%-ui` or `z vue my ui`.
|
||||
|
||||
## How to integrate z.lua to ranger ?
|
||||
|
||||
Copy [ranger_zlua.py](https://github.com/skywind3000/z.lua/blob/master/ranger_zlua.py) to your `~/.config/ranger/plugins` folder, and set environment variable in your shell rc:
|
||||
|
||||
```bash
|
||||
export RANGER_ZLUA="/path/to/z.lua"
|
||||
```
|
||||
|
||||
The integration script provides a `z` command in ranger. It also tracks directories changes in ranger.
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user