zimfw/completion

Completions for zimfw/zmodule

scottdotau opened this issue · 3 comments

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex.

I think it would be a good idea for either this module, or the zimfw/ zmodule commands themselves to provide autocomplete functions for those two commands, respectively.

For example, I want to use zimfw list command. The functionally that this module provides, can end up being an annoyance when I complete (in autopilot mode) to zimfw long_file_name_that_I_have_to_remove.sad)

Describe the solution you'd like
A clear and concise description of what you want to happen.

Provide completions for zimfw / zmodule.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

None.

Additional context
Add any other context or screenshots about the feature request here.

Happy to discuss more if needed!

ericbn commented

Hi @scottdotau. This module is a good place to put the completion, under functions/_zimfw. Not sure if adding completion for zmodule makes sense, as zmodule is not intended to be used via the command line. Want to work on a PR?

@ericbn, sure. Would _zimfw in a new functions directory as per zimfw autoload be best? Not sure if functions or the module itself load first, or if that even matters? Though I'm assuming it does as it's mentioned to include plugins that export completions before.

ericbn commented

The functions subdirectory is added to fpath before the init.zsh script is sourced, so compinit should pick the functions/_zimfw completion as expected.