Open taikulawo opened 1 month ago
Hmm, I really can't help without more info. Maybe share your entire configuration and sync strategy, maybe in a Docker image or a repository.
extract to fish/ then run fisher update
fish.tar.gz
Could you share the contents here instead?
sure. fish_plugins file
jorgebucaran/fisher
patrickf1/fzf.fish
and install fisher
Is that what's in your gzipped tar file? What I need is your complete configuration and sync setup. Without it, reproducing your state won't be possible anytime soon.
https://github.com/taikulawo/home
I clone (means sync)it on my homedir
The only file I'd put in my dot files would be fish_plugins, similar to how you wouldn't sync node_modules.
I dont understand, I'm wrong?
I saw you're committing all Fish files in your repo, including plugins likely installed with Fisher. In that case, what would be the purpose of fish_plugins? This file serves as a manifest of your plugins and should be enough for syncing across different machines. You'd simply use fisher install
to install the plugins instead of relying on git.
Does fisher install
not extra argument can install all plugin in manifest?
$ fisher install
fisher: Not enough arguments for command: "install"
sometime my network is offline, so I need to sync plugin file at first. but why fisher delete fish_plugins when I run fisher update
?
Thanks for the clarification. You're right, it's fisher update
(not install
), as indicated in the docs. 👍
Yes, Fisher will delete fish_plugins, but only if it's empty. For example, if you remove all plugins from fish_plugins and then run fisher update
, Fisher will uninstall all plugins and subsequently delete the file.
but my file_plugins
is not empty
My approach to test this:
fisher update
.This process should make sure that B is updated to match A, which is how Fisher is supposed to work.
oh, I found reason
when I init fisher, fisher add following variables to fish_variables
file. But my sync don't include it. On another manchine which don't have this variable, fisher will remove fish_plugins file
SETUVAR __fish_initialized:3400
SETUVAR _fisher_jorgebucaran_2F_fisher_files:\x7e/\x2econfig/fish/functions/fisher\x2efish\x1e\x7e/\x2econfig/fish/completions/fisher\x2efish
SETUVAR _fisher_plugins:jorgebucaran/fisher
Is those variable necessary? I think fish_plugins
is enough
The approach I outlined above should do for a basic setup. For example, if you uninstall all your plugins, start from scratch, create a fish_plugins file, add several plugins to it, and then run fisher update, Fisher should install those plugins. But if this isn't enough for you, how about committing your fish_variables in addition to your fish_plugins.
fish_variables is platform special. I sync all my conf across different platform, linux/mac, so fish_variables isn't suitable for my case if I sync it, which make linux variable sync to windows, broken
from my test, If target machine don't have fisher special variable in fish_variables
, fisher update will broken, delete fish_plugin
file
Fisher cleans and variables before saving or reading from fish_variables to prevent some basic issues, e.g.:
...but I don't know about Windows.
What I did: I made sure there were no Fisher variables in fish_variables, uninstalled everything Fisher-related, created an empty fish_plugins file, added some plugins, thus replicating a machine without Fisher but with my fish_plugins file. Then, fisher update
, and it behaved as expected; the plugins were installed.
you should exit fish, and reopen a new fresh fish instance, make sure there not fisher variable
. then fisher update
I did that and succeeded. Did that not work for you?
rm -rf ~/.config/fish
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher
rm ~/.config/fish/fish_variables
# let fish exit now
# open a new fish shell
# make sure no value output
echo $_fisher_plugins
# run fisher update, fish_plugins file should be deleted
fisher update
To clarify, did this work out for you?
rm -rf ~/.config/fish curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher rm ~/.config/fish/fish_variables # let fish exit now # open a new fish shell # make sure no value output echo $_fisher_plugins # run fisher update, fish_plugins file should be deleted fisher update
no, it's bug reproduce step.
I sync fish config across machine by git. But on another machine I run
fisher update
, fisher just deletefish_plugins