Skip to content

Commit 8210c56

Browse files
authored
Merge pull request #132 from ilyagr/patch-1
Improve Fish installation instructions
2 parents 44a2489 + a01b28a commit 8210c56

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,17 +105,17 @@ z -b foo # cd to the parent directory starting with foo
105105

106106
To generate old posix compatible script.
107107

108-
- Fish Shell:
108+
- Fish Shell (version `2.4.0` or above):
109109

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

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

114-
Fish version `2.4.0` or above is required.
114+
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
115115

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

118-
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.
118+
into the same file.
119119

120120
- Power Shell:
121121

@@ -268,7 +268,7 @@ To enable this, you can set `$_ZL_ADD_ONCE` to `1` before init z.lua. Or you can
268268
````bash
269269
eval "$(lua /path/to/z.lua --init bash once)"
270270
eval "$(lua /path/to/z.lua --init zsh once)"
271-
source (lua /path/to/z.lua --init fish once | psub)
271+
lua /path/to/z.lua --init fish once | source
272272
````
273273

274274
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.

0 commit comments

Comments
 (0)