Open charego opened 1 year ago
Bump for further consideration, @jorgebucaran. Thanks.
I have been addressing and investigating issues all weekend, so I am taking a break for now. However, I wanted to let you know that I will certainly look into this matter soon and will incorporate this change (or a similar one, as I'm not certain this will be merged as is) before Fisher 5. This should occur in the not-too-distant future. 🙏
Is the issue described here possibly related to one I have?
vv@my-precious ~/.config/fish/conf.d $ fisher install oh-my-fish/plugin-bang-bang
fisher install version 4.4.3
Fetching https://api.github.com/repos/oh-my-fish/plugin-bang-bang/tarball/HEAD
fisher: Invalid plugin name or host unavailable: "oh-my-fish/plugin-bang-bang"
vv@my-precious ~/.config/fish/conf.d $ ll
I doubt it. It might be related to the curl or tar version or your OS. What's your OS, distro, and the curl and tar version you're using?
I doubt it. It might be related to the curl or tar version or your OS. What's your OS, distro, and the curl and tar version you're using?
its latest macos with m1 chip
vv@my-precious ~/work/own/careerpartner/src $ curl -V
curl 7.88.1 (x86_64-apple-darwin22.0) libcurl/7.88.1 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.11 nghttp2/1.51.0
Release-Date: 2023-02-20
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL threadsafe UnixSockets
vv@my-precious ~/work/own/careerpartner/src $ tar --version
bsdtar 3.5.3 - libarchive 3.5.3 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.8
vv@my-precious ~/work/own/careerpartner/src $
okay, I figured it out
@charego Sorry, but can you break down the main goal and reason for this PR again? Why's it a must-have?
Essentially, how to use Fisher with dotfiles? Is there a best practice as you see it? The instructions are geared toward interactive use. I would like to bootstrap Fisher from dotfiles on a new machine without interactive use.
Essentially, how to use Fisher with dotfiles? Is there a best practice as you see it? The instructions are geared toward interactive use. I would like to bootstrap Fisher from dotfiles on a new machine without interactive use.
Same here. I would like to use Fisher declaratively through Nix Home Manager. Haven't had any luck so far.
Honestly, the reason I haven't been able to work on this is because I don't understand the aim at a fundamental level. Do you just want Fisher to fail silently if universal variables are not set?
@jorgebucaran, from what I understand, the idea is to not use fish_variables
to store fisher state as some of us don't commit fish_variables
to our dotfiles repo.
So our options are:
fish_plugins
file and the list of installed files in ~/.config/fish/
;fisher update
that would let us overwrite the files present in ~/.config/fish
, but absent in fish_variables
.The reason we don't commit fish_variable
is that it'll contain state that's only relevant to one machine.
For example, mine contains a bunch of variables set by Z
that points to folders in my home dir, and the home dir will be different in different machines because of different usernames.
@jorgebucaran One more thing to consider before merging this, maybe we should commit fish_variables
to the dotfiles repo.
Plugins should not store non-portable data in fish_variables
.
For reference: https://github.com/jorgebucaran/fisher/issues/611 https://github.com/jethrokuan/z/issues/104
@itsfarseen from what I understand, the idea is to not use fish_variables to store fisher state as some of us don't commit fish_variables to our dotfiles repo.
That sounds a lot like https://github.com/jorgebucaran/fisher/issues/611. Fisher preserves the '~' in paths when saving plugins to the universal state, making it safer to commit fish_variables. While it might not be perfect, it does prevent committing data that obviously varies across machines, such as different usernames or home directories. What else are we missing?
@jorgebucaran
Fisher preserves the '~' in paths when saving plugins to the universal state
Yes, but Z doesn't. And possibly other plugins too.
OP's solution to this is to not commit fish_variables
to the dotfiles repo.
My opinion is that, ideally we should ask Z and other problematic plugins to implement proper handling of fish_variables
, instead of trying to make fisher work with missing fish_variables
.
This change is for users who commit fish_plugins and plugin sources but omit fish_variables.
On a system where Fisher's universal variables are unset, most Fisher commands do not work out-of-the-box:
fisher list [<regex>]
fisher remove repo/plugin
fisher update repo/plugin
fisher update
fisher install repo/plugin
fisher update
As of this commit all Fisher commands work except for
fisher remove
. Fisher still has no way of knowing which files to remove absent the universal variable that tracks the files associated to a plugin. It may make sense to reject calls likefisher remove repo/plugin
if the_fisher_repo_2F_plugin_files
universal variable is missing. Fisher could suggest the user runfisher update
and try again.Note: I haven't really investigated how this works with local plugins since I don't use those.
Attempt to fix https://github.com/jorgebucaran/fisher/issues/741.