Description
I would like to track not only the list of plugins (fish_plugins
file) but also the source code of those plugins, for a few reasons. Typically when you run "fisher update" you don't know if anything changed in your plugins. Tracking the files in git makes it easier to review changes after you pull them in, and commit them to your dotfiles once you "approve" them. Secondly, it makes provisioning a new machine easier because you don't need to install Fisher manually, the code is already in your dotfiles.
The problem emerges when you want to run "fisher update" because the universal variables expected by Fisher are missing (I would prefer not to track the fish_variables
file). Rather than suggest a duplicate of #611 ("Fisher should stop using universal variables for plugin state"), I wonder if it would be possible for Fisher to create the universal variables on startup if they don't exist?
if ! set --query _fisher_plugins
# setup the Fisher universal variables by inspecting fish_plugins, etc.
end
Here is a minimal example: https://git.sr.ht/~crg/fishy
> docker container run --rm -it fishy
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
root@59bd29f2ca3c /# fisher update
fisher update version 4.4.3
Fetching https://api.github.com/repos/jorgebucaran/fisher/tarball/HEAD
Fetching https://api.github.com/repos/jorgebucaran/replay.fish/tarball/HEAD
fisher: Cannot install "jorgebucaran/fisher": please remove or move conflicting files first:
/root/.config/fish/functions/fisher.fish
/root/.config/fish/completions/fisher.fish
fisher: Cannot install "jorgebucaran/replay.fish": please remove or move conflicting files first:
/root/.config/fish/functions/replay.fish
/root/.config/fish/completions/replay.fish