Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,17 @@ z -b foo # cd to the parent directory starting with foo

To generate old posix compatible script.

- Fish Shell:
- Fish Shell (version `2.4.0` or above):

Create `~/.config/fish/conf.d/z.fish` with following code

source (lua /path/to/z.lua --init fish | psub)
lua /path/to/z.lua --init fish | source

Fish version `2.4.0` or above is required.
If you'd like `z.lua` to cooperate with fish's own [directory history](https://fishshell.com/docs/3.2/index.html#id34), you can put

lua /path/to/z.lua --init fish > ~/.config/fish/conf.d/z.fish
set -gx _ZL_CD cd

This is another way to initialize z.lua in fish shell, but remember to regenerate z.fish if z.lua has been updated or moved.
into the same file.

- Power Shell:

Expand Down Expand Up @@ -268,7 +268,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)"
source (lua /path/to/z.lua --init fish once | psub)
lua /path/to/z.lua --init fish once | source
````

With `add once` mode off (default), z.lua will consider the time you spent in the directory (like z.sh). When this mode is on, consider the times you accessed the directory (like autojump), and that could be much faster on slow hardware.
Expand Down