Hi, I just start using fish and am very happy with it, so simple and powerful
I'm using fish 2.2.0 and trying to install z https://github.com/rupa/z
brew install z
omf install z
but when running z, an error occurs
bash: line 0: source: filename argument required
source: usage: source filename [arguments]
bash: _z: command not found
How do fix this? Thanks
I'm not entirely sure of the reason; z seems to be working on a fresh install for me. Let's check out your environment. Please if you would, paste the output of each of the following commands:
which ztype zset | grep '^Z_'It may be an issue on how the plugin is set up, or an issue in the plugin itself.
@coderstephen thanks for your prompt reply
which z and set | grep '^Z'_ prints nothing. type z prints
z is a function with definition
function z --description 'jump around'
cd (bash -c "source $Z_SCRIPT_PATH; _z $argv; echo \$PWD")
end
brew install z prints "z-1.9 already installed" and omf install z prints "package z already installed"
Alright, thank you for that information. According to the z plugin docs, you need to manually set $Z_SCRIPT_PATH to the location that Homebrew installed z.sh to. I don't have a Mac so I can't test it out, but something like the following should work if you put it in $OMF_CONFIG/init.fish:
set -g Z_SCRIPT_PATH (brew --prefix)/etc/profile.d/z.sh
@coderstephen yeah, it works. Didn't know about those plugin repos, thanks :tada:
Glad you got it working! Feel free to open another issue for any other problems or suggestions you may have. :wave:
I have this same issue.
I switched to https://github.com/fisherman/z
Most helpful comment
I switched to https://github.com/fisherman/z