jorgebucaran / fisher

A plugin manager for Fish
https://git.io/fisher
MIT License
7.55k stars 257 forks source link

McFly incompatibility #659

Closed esafak closed 3 years ago

esafak commented 3 years ago

I tried to install fisher on top of McFly using

curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher

I got

fisher install version 4.2.0
fish: Unknown command: mcfly_key_bindings
~/.config/fish/config.fish (line 37):
  mcfly_key_bindings
  ^
from sourcing file ~/.config/fish/config.fish
    called during startup
Fetching https://codeload.github.com/jorgebucaran/fisher/tar.gz/HEAD
fisher: Cannot install "jorgebucaran/fisher": please remove or move conflicting files first:
        /Users/esafak/.config/fish/functions/fisher.fish
        /Users/esafak/.config/fish/completions/fisher.fish

My workaround was to remove said files, and retry after commenting out the "mcfly_key_bindings" line.

jorgebucaran commented 3 years ago

What is McFly? What's your Fish version?

Can you copy-paste your config.fish here? Maybe there's something in it causing trouble.

Also, make sure you are running the latest Fisher.

esafak commented 3 years ago

Thanks for the prompt response!

https://github.com/cantino/mcfly is a history navigator. The relevant part of my config.fish is:

if test -r "/opt/local/share/mcfly/mcfly.fish"
  source "/opt/local/share/mcfly/mcfly.fish"
  mcfly_key_bindings
end

4.2.0 is the latest version.

jorgebucaran commented 3 years ago

Try running McFly only if you are interactive:

if status is-interactive
  if test -r /opt/local/share/mcfly/mcfly.fish
    source /opt/local/share/mcfly/mcfly.fish && mcfly_key_bindings
  end
end
esafak commented 3 years ago

Works for me. Thanks, again.