chisui / zsh-nix-shell

zsh plugin that lets you use zsh in nix-shell shells.
BSD 3-Clause "New" or "Revised" License
373 stars 19 forks source link

Get error with zsh-nix-shell activated #1

Closed nikitavoloboev closed 6 years ago

nikitavoloboev commented 6 years ago

I installed this plugin with Antibody and tried to test nix-shell but I got an error:

❯ nix-shell -p hello
whereis: illegal option -- b
usage: whereis program [...]
nix-shell:2: bad pattern: ARGS=(-p

However if I stop using this plugin, it works with no errors:

❯ nix-shell -p hello

[nix-shell:~]$

Not sure why this happens.

chisui commented 6 years ago

I have never heard of antibody so it's not supported currently.

What shell and version are you using?

Does it work if you install it directly?

nikitavoloboev commented 6 years ago

What shell and version are you using?

❯ zsh --version
zsh 5.5.1 (x86_64-apple-darwin16.6.0)

Does it work if you install it directly?

I tried to put contents of this file to the end of my zshrc.

Same error.

chisui commented 6 years ago

I could not reproduce this bug with zsh 5.5.1 on NixOs. I don't have access to a Mac but going by this and this issue it seems that whereis works diffently on Mac.

Does #2 fix your issue?

nikitavoloboev commented 6 years ago

It does not. I get this error now:

❯ nix-shell -p hello
nix-shell:2: bad pattern: ARGS=(-p

~

Here is my zshrc with your plugin.

chisui commented 6 years ago

I can't reproduce that issue and I double checked the zsh documentation. There was an error in zsh-5.0.8 though that looks like this.

I changed some stuff around in #2. Is it working now?

nikitavoloboev commented 6 years ago

It's solved. Thanks @chisui