Oh-my-fish: Install z

Created on 21 Mar 2016  路  7Comments  路  Source: oh-my-fish/oh-my-fish

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

plugins

Most helpful comment

All 7 comments

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 z
  • type z
  • set | 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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

adgai19 picture adgai19  路  3Comments

NineSwordsMonster picture NineSwordsMonster  路  4Comments

calebmeyer picture calebmeyer  路  4Comments

CeleritasCelery picture CeleritasCelery  路  7Comments

98thpixel picture 98thpixel  路  7Comments