jorgebucaran / fisher

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

Installing fisher in fresh environment erases existing fish_plugins #775

Closed evilhamsterman closed 10 months ago

evilhamsterman commented 10 months ago

If you run the install command on a fresh instance but you already have a .config/fish/fish_plugins file, for example if you use a dotfiles repo, the install will empty the file leaving just jorgebucaran/fisher

Here's and example I ran in an Ubuntu container docker run --rm -it ubuntu /bin/bash so it's completely clean, all I did was install curl and fish then opened fish from bash

root@b40c530cf35a:~# fish
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
root@b40c530cf35a ~# ls -a
.  ..  .bashrc  .config  .local  .profile
root@b40c530cf35a ~# ls .config/fish
completions  conf.d  config.fish  fish_variables  functions
root@b40c530cf35a ~# echo "jorgebucaran/fisher
                     evilhamsterman/fish-sudo
                     evilhamsterman/fish-functions
                     ">.config/fish/fish_plugins
root@b40c530cf35a ~# cat .config/fish/fish_plugins
jorgebucaran/fisher
evilhamsterman/fish-sudo
evilhamsterman/fish-functions

root@b40c530cf35a ~# curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source
&& fisher install jorgebucaran/fisher
fisher install version 4.4.4
Fetching https://api.github.com/repos/jorgebucaran/fisher/tarball/HEAD
Installing jorgebucaran/fisher
           /root/.config/fish/functions/fisher.fish
           /root/.config/fish/completions/fisher.fish
Installed 1 plugin/s
root@b40c530cf35a ~# cat .config/fish/fish_plugins
jorgebucaran/fisher
root@b40c530cf35a ~#
jorgebucaran commented 10 months ago

You're right, the issue seems to be specific to that bootstrapping scenario. The install command is doing exactly what it's designed for. If you've got a fish_plugins file in your new environment, you can simply bootstrap Fisher using:

curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher update

This should get everything up to date.

evilhamsterman commented 10 months ago

Sounds reasonable, probably help to update the docs to help poor schmucks like me 😁

jorgebucaran commented 10 months ago

Alright, we'll see about that! 👍