-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initialize _fisher_plugins using fish_plugins file (#741) #746
base: main
Are you sure you want to change the base?
Conversation
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? Lines 101 to 106 in 59228d6
|
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 |
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 were not working out-of-the-box: * `fisher install <plugin>` - installs <plugin>, rewrites fish_plugins file with only <plugin> - if <plugin> is in fish_plugins, same behavior as `fisher update` * `fisher remove <plugin>` - fails with error: Plugin not installed "<plugin>" * `fisher update <plugin>` - fails with error: Plugin not installed "<plugin>" * `fisher update` - fails with error about conflicting files, deletes fish_plugins file * `fisher list [<regex>]` - returns nothing 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 like `fisher remove <plugin>` if the `_fisher_<plugin>_files` universal variable is missing. Fisher could suggest the user run `fisher update` and try again.
@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. |
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 So our options are:
The reason we don't commit For example, mine contains a bunch of variables set by |
@jorgebucaran One more thing to consider before merging this, maybe we should commit Plugins should not store non-portable data in For reference: |
That sounds a lot like #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? |
Yes, but Z doesn't. And possibly other plugins too. OP's solution to this is to not commit My opinion is that, ideally we should ask Z and other problematic plugins to implement proper handling of |
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 #741.