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
Plugins using init.fish don't work #8
Comments
@tcoenraad Thanks for reporting, I did not know that oh-my-fish was emitting an event after loading plugins. I want the plugins to be compatible, so I am going to add this. |
@tcoenraad This should now be fixed, I would be glad if you could give it a try. |
@tuvistavie I think we're almost there, yet now the plugin name is incorrectly retrieved. For example for plugin-grc: ⋊> ~ echo 'oh-my-fish/plugin-grc' | awk -F/ '{print $NF}' | sed -e s/plugin//
-grc This results in fish: Unknown command 'available grc'
~/.config/fish/fundle/oh-my-fish/plugin-grc/grc.fish (line 5): if not available grc
^
in function 'init'
called on line 135 of file ~/.config/fish/functions/fundle.fish
with parameter list '/Users/twancoenraad/.config/fish/fundle/oh-my-fish/plugin-grc'
in event handler: handler for generic event 'init_grc' Okay, I have to reorder plugins to load fish: Unknown command 'grc.wrap cat'
~/.config/fish/config.fish (line 1): grc.wrap $executable $argv
^
in function 'cat'
called on line 69 of file /usr/local/Cellar/fish/HEAD/share/fish/functions/psub.fish Can you please look into this? I guess that dependencies of a plugin should be sourced first, before invoking any initializations. Besides, in the future, string manipulation can be done in native Fish (see fish-shell/fish-shell#156) 😄 |
@tcoenraad Thanks for reporting. This should now be fixed in oh-my-fish plugins are kind of a mess, sometimes functions are in the Please let me know if you still have any issue. |
I see that while I was commenting, you almost already fixed it. It's now working beautifully (well, as far it can with those messy |
Thanks, I am probably going to switch to the fish implementation, but fish 2.0 and 2.1 are (supposed to be) supported for now (and string manipulation has been added in 2.2 if I remember), so I will see when I drop the support for older fish versions.
👍 |
@tuvistavie I'm getting the same issue on |
For example:
It seems that
fundle.fish
is invokinginit_$plugin_name
not at all, as is done by Oh My Fish: https://github.com/oh-my-fish/oh-my-fish/blob/93ddd6f213d6f21386651a1663f9f3460e35dbec/lib/require.fish#L34The text was updated successfully, but these errors were encountered: