Skip to content
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

Support automatic function activation #112

Open
daisylb opened this issue Feb 11, 2017 · 0 comments
Open

Support automatic function activation #112

daisylb opened this issue Feb 11, 2017 · 0 comments
Assignees

Comments

@daisylb
Copy link
Collaborator

daisylb commented Feb 11, 2017

Fish supports lazy loading ("automatic activation") of functions, but virtualfish isn't compatible with it. Supporting it is a matter of creating a vf.fish in the vendor_functions.d directory that has the vf function's definition and nothing else, and another vf.fish in the vendor_completions.d directory which has all of vf's tab-completion code.

This would be simple enough but for virtualfish's plugin-based structure, which might be tricky to shoe-horn into the structure required by fish. What I'm thinking at the moment is that the vf command lazily loads the appropriate plugin before calling it, and that each plugin provides a separate plugin_completion.fish, and all of the ones for the active plugins get concatenated together as part of the install process. Plugins that need things like event handlers could also provide a plugin_init.fish that gets concatenated into an init.d script (see #111).

The other option is just ditching the plugin structure altogether; I'm quite fond of it, but there's only a few plugins, so it might not be worth it.

On that note, I'm 50/50 on whether this whole thing is worth the effort or not; auto-activation users will get at least parts of vf loaded every time they cd anyway, and after we implement #111, virtualfish's shell startup overhead should reduce anyway.

@daisylb daisylb self-assigned this Feb 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant