jorgebucaran / fisher

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

If "tabs -8" is present in config.fish then fisher install doesn't work #747

Closed vEnhance closed 1 year ago

vEnhance commented 1 year ago

Bug report. I apologize if this is a false positive, as I am an amateur programmer with no professional code experience, so your patience is much appreciated. Indeed, the symptoms described here are bizarre enough that I find it hard to believe.

Steps to reproduce (on Arch Linux 6.0.7-arch1-1):

  1. Erase ~/.config/fish/ entirely (i.e. fresh install).
  2. Install fisher. I used sudo pacman -S fisher in lieu of curl -sL https://git.io/fisher | source though I think the latter gives the same error since AFAIK it's just a matter of whether the initial files go in /home or /usr.
  3. Start a new fish session. This autogenerates the skeleton files in ~/.config/fish.
  4. Replace the skeletal ~/.config/fish/config.fish with the following contents:
    tabs -8
  5. Run fisher install jorgebucaran/fisher. This is supposed to install fisher into ~/.config/fish. Instead, it hangs until interrupted.
  6. Delete the contents of ~/.config/fish/config.fish.
  7. Rerun fisher install jorgebucaran/fisher. Now everything works fine.

As long as tabs -8 was in my config.fish I was also unable to use fisher update, though fisher list worked.

jorgebucaran commented 1 year ago

Replace tabs -8 as follows and try again:

status is-interactive && tabs -8
vEnhance commented 1 year ago

Yes, that appears to fix the issue. Thanks. I'm not sure whether you want to treat this as a bug that needs to be fixed; if not, feel free to close.

jorgebucaran commented 1 year ago

Fisher installs and updates plugins asynchronously, spawning a new process for each plugin. This reloads config.fish for each plugin too. That's why status is-interactive is false, preventing tabs -8 from running. I'm not sure why would tabs -8 hang Fish, but the same problem would happen if you were trying to read the user's input in your config.fish (I've seen some people do that 🤷‍♂️).

jorgebucaran commented 1 year ago

Thank you for the super detailed issue description, though. It shows that you put a lot of effort into it. I'm sorry that I can only offer you a workaround. Notice that you'd have to do the same thing (use status is-interactive && ...) for every other command that you want to run in your config.fish that could potentially hang Fish. This is a general issue with any plugin that wants to do async stuff in Fish, not just Fisher.

vEnhance commented 1 year ago

Workarounds are fine :) thanks for the detailed reply.