danhper/fundle

Runtime path

Perlence opened this issue · 5 comments

Can there be an additional argument to fundle plugin to use selected subfolder of repo as root of a fish plugin? The idea comes from vim-plug.

For example, there's folder with tmuxinator completions for various shells. I could write, e.g. fundle plugin 'tmuxnator/tmuxinator' --rtp 'completion'.

@Perlence Hi and thanks for the idea.
Actually, I have been wanting to add this for a while but did not have the time to implement it yet.
I will try to implement this when I have a moment, but any help is welcome!

@Perlence Great job, thank you very much!
This will also help a lot implementing the last feature I want before releasing 1.0.

Just one point, I think we can avoid having a whole state machine here,
as the only thing we need to check is the next argument.
We could simply iterate on the index, and when an argument is needed, check the next element in the list.
It is less flexible but more concise, and it should be sufficient for this use case.

https://gist.github.com/tuvistavie/15d5a9168c56c2d377f6

@Perlence Also, we cannot use -a in fishtape tests, see fisherman/fishtape#5 for an alternative.

I see. I'll simplify argument parser and fix existing tests.