jorgebucaran / fisher

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

Weird behaviour when attempting to use fisher #664

Closed ribosomerocker closed 3 years ago

ribosomerocker commented 3 years ago

Heyo. I just upgraded to fish 3.2.0, and tried to use fisher using the method described in your README.md, but it throws a processin the background and apparently the plugin isn't really installed neither, here's what I get when i run fg:

~/Git took 2s
✦ ❯ fg
Send job 1, 'fish --command "
                    if test -e $plugin
                        command cp -Rf $plugin/* $source
                    else
                        set temp (command mktemp -d)
                        set name (string split \@ $plugin) || set name[2] HEAD
                        set url https://codeload.github.com/\$name[1]/tar.gz/\$name[2]

                        echo Fetching (set_color --underline)\$url(set_color normal)

                        if curl --silent \$url | tar --extract --gzip --directory \$temp --file - 2>/dev/null
                            command cp -Rf \$temp/*/* $source
                        else
                            echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2
                            command rm -rf $source
                        end
                        command rm -rf \$temp
                    end

                    set files $source/* && string match --quiet --regex -- .+\.fish\\\$ \$files || exit

                    echo \"fisher: Plugin not supported: \\\"$plugin\\\"\" >&2
                    echo (set_color --bold red)\"Support for .fish files outside a functions directory is deprecated\" (set_color --underline)https://github.com/jorgebucaran/fisher/issues/651(set_color normal) >&2
                " &' to foreground
Fetching https://codeload.github.com/jorgebucaran/fisher/tar.gz/3.2.0
cp: target '/tmp/tmp.QszPWjUFVA' is not a directory
jorgebucaran commented 3 years ago

Maybe you have some stuff in your config.fish that should run only when you are interactive that interferes with Fisher.

ribosomerocker commented 3 years ago

Doesn't seem like it, here's my config.fish:

alias nv=nvim
alias py=python3.9
alias mkdir="mkdir -p"
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
alias cat='bat'

set -U EDITOR nvim
set -U BROWSER firefox
set -U TERMINAL alacritty
ribosomerocker commented 3 years ago

To add more detail in terms of why i think it doesn't really install them, I tried to install tide using fisher as they suggested but it isn't working whatsoever.

jorgebucaran commented 3 years ago

What else did you try? What OS are you running? Did you try installing other plugins?

ribosomerocker commented 3 years ago

I'm running Artix linux 5.10, and I haven't really tried any other package or method to install tide, if that's what you're asking, and with tide, it does the same as what fisher does when it tries to install itself, it just throws a process into the background, and when uncovered just errors with something about /tmp/tmp.XXXX not being a directory.

jorgebucaran commented 3 years ago

No, I'm asking if you tried installing other plugins? Try installing other plugins.

Were you able to install Fisher at all using the instructions in the README?

Do you have any reason to believe there's something wrong with your curl?

jorgebucaran commented 3 years ago

I also moving your config.fish out of the way, just temporarily, to make sure it's not it.

Also, were you running Fisher before already, e.g., did you upgrade from 3.x, or is this your first time?

ribosomerocker commented 3 years ago

Also, were you running Fisher before already, e.g., did you upgrade from 3.x, or is this your first time?

This is my first time running fisher on a relatively fresh distro, I installed it a few months ago.

No, I'm asking if you tried installing other plugins? Try installing other plugins.

I've tried to install 4 now:

IlanCosman/tide
jorgebucaran/fisher
jorgebucaran/hydro
jorgebucaran/replay.fish

And all of them fail with the same error.

Were you able to install Fisher at all using the instructions in the README?

The farthest it gets is the curl-ed fisher saying that the installation is done, then it comes up with the problem I described earlier.

Do you have any reason to believe there's something wrong with your curl?

I don't believe so, and even if it did, I re-installed it, re-ran the command in the README and it had the same issue.

ribosomerocker commented 3 years ago

To be clear, here's what fisher outputs once it installs a package:

[I] mon@artix-pc ~> curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher
fisher install version 4.2.0
Installing jorgebucaran/fisher
Installed 1 plugin/s

But as I said earlier, it puts a process in the fg and the process fails, leaving the plugin without being properly installed.

ribosomerocker commented 3 years ago

I also moving your config.fish out of the way, just temporarily, to make sure it's not it.

I commented all the code in my config.fish and make sure that everything it aliased was back to normal, still had the same error

jorgebucaran commented 3 years ago

Do you have any fish files inside ~/.config/fish/conf.d? Something is happening when Fish starts that stops the job.

ribosomerocker commented 3 years ago

Hmm... doing ls -A ~/.config/fish/conf.d shows nothing

jorgebucaran commented 3 years ago

Can you try another terminal just to test this?

ribosomerocker commented 3 years ago

Alright, was on Alacritty and now tried Termite, still get the same problem. You reckon it might be something that relates to my init system or something? I don't use systemd, is that a problem?

jorgebucaran commented 3 years ago

I really don't know. What's your init system by the way?

Out of curiosity, try this:

fish -c "sleep 3" &
ribosomerocker commented 3 years ago
[I] mon@artix-pc ~> fish -c "sleep 3" &
[I] mon@artix-pc ~> fish: Job 1, 'fish -c "sleep 3" &' has stopped
[I] mon@artix-pc ~> fg
Send job 1, 'fish -c "sleep 3" &' to foreground
[I] mon@artix-pc ~>

And my init system is Runit.

jorgebucaran commented 3 years ago

So, this is not a Fisher or Tide issue. You shouldn't need to bring the job to the foreground like that. It should just end:

me@home ~> fish -c "sleep 3" &
me@home ~> fish: Job 1, 'fish -c "sleep 3" &' has ended
jorgebucaran commented 3 years ago

You seem to have an issue with Fish and backgrounds jobs, not Fisher or Tide. I suggest filing an issue in fish-shell/fish-shell.

ribosomerocker commented 3 years ago

Hmmm... yeah, thank you so very much for deducing it for me! After some googling looks like this:

[I] mon@artix-pc ~> fish -c "sleep 3" < /dev/null &
[I] mon@artix-pc ~> fish: Job 1, 'fish -c "sleep 3" < /dev/null &' has ended

Would generate the outcome you're expecting, it seems to be trying to read from stdin but by making it take from /dev/null, it doesn't let it pause in background... Interesting...

jorgebucaran commented 3 years ago

Definitely sounds like something someone from the Fish team using Linux would probably know about.