Skip to content

Commit

Permalink
Merge pull request #132 from ilyagr/patch-1
Browse files Browse the repository at this point in the history
Improve Fish installation instructions
  • Loading branch information
skywind3000 authored Mar 8, 2021
2 parents 44a2489 + a01b28a commit 8210c56
Showing 1 changed file with 6 additions and 6 deletions.
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

0 comments on commit 8210c56

Please sign in to comment.