mirror of
https://github.com/skywind3000/z.lua
synced 2026-03-13 03:09:49 +00:00
Merge pull request #132 from ilyagr/patch-1
Improve Fish installation instructions
This commit is contained in:
12
README.md
12
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.
|
||||
|
||||
Reference in New Issue
Block a user