jorgebucaran / fisher

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

Error while reading file fisher.fish #648

Closed TheFern2 closed 3 years ago

TheFern2 commented 3 years ago

Hi, I had version 3, and I followed the self-update, got a bunch of errors and even though it printed version 4 was successfully installed, shell had a bunch of errors pointing to wrong syntax with fisher.fish. I manually removed, and tried to do fisher install with no success.

~/Downloads ❯❯❯ curl -sL https://git.io/fisher > fisher.fish
~/Downloads ❯❯❯ fish fisher.fish
fisher.fish (line 47): Expected a command, but found end of the statement
                        test "$cmd" = remove &&
                                               ^
warning: Error while reading file fisher.fish

Running fish 3.1.2, not entirely sure what happened. Ubuntu 20.04

jorgebucaran commented 3 years ago

Please verify if your shell supports && and ||. Maybe your Fish 3.1.2 installation is broken somehow.

What does this say?

$ fish_indent --ansi <fisher.fish

Also, you probably meant source fisher.fish, not fish fisher.fish, as sourcing Fisher in a subshell won't do anything.

jorgebucaran commented 3 years ago

I can't reproduce on Linux. I just tested this with andreiborisov/fish:latest:

$ docker run -it --rm andreiborisov/fish:latest
Welcome to fish, the friendly interactive shell
Type `help` for instructions on how to use fish
nemo@cc29fd2950e1 ~> curl -sL git.io/fisher >fisher.fish && fish fisher.fish
nemo@cc29fd2950e1 ~> ⎢

Make sure you're running the latest Fish and try again.

krobelus commented 3 years ago

This is really odd, this should work. Maybe ignoring configuration with HOME=(mktemp -d) fish works but I doubt it. Does it work on a nightly version of fish?

TheFern2 commented 3 years ago

Thanks for the help, first thing I did was removed fish current install. I had manually built at some point because apt completions didn't work for files in the current version of apt repository at that time. I installed fish from apt, and all problems were solved. So that version I had prob didn't support those operands just yet.

/u/l/bin ❯❯❯ fish --version
fish, version 3.1.0
/u/l/bin ❯❯❯ curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher
fisher install version 4.2.0-rc-1
Fetching https://codeload.github.com/jorgebucaran/fisher/tar.gz/HEAD
Installing jorgebucaran/fisher
           /home/fernandob/.config/fish/functions/fisher.fish
           /home/fernandob/.config/fish/completions/fisher.fish
Updated 1 plugin/s
/u/l/bin ❯❯❯ fisher install jorgebucaran/nvm.fish
fisher install version 4.2.0-rc-1
Fetching https://codeload.github.com/jorgebucaran/nvm.fish/tar.gz/HEAD
Installing jorgebucaran/nvm.fish
           /home/fernandob/.config/fish/functions/nvm.fish
           /home/fernandob/.config/fish/functions/_nvm_index_update.fish
           /home/fernandob/.config/fish/functions/_nvm_list.fish
           /home/fernandob/.config/fish/functions/_nvm_version_activate.fish
           /home/fernandob/.config/fish/functions/_nvm_version_deactivate.fish
           /home/fernandob/.config/fish/conf.d/nvm.fish
           /home/fernandob/.config/fish/completions/nvm.fish
Downloading the Node distribution index for the first time...
Installed 1 plugin/s
/u/l/bin ❯❯❯ nvm ls
 ▶ system  
/u/l/bin ❯❯❯