diff --git a/README.md b/README.md index 04f769b..c3da9a9 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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.