danhper / fundle

A minimalist package manager for fish shell
MIT License
376 stars 22 forks source link

Runtime path #11

Closed Perlence closed 8 years ago

Perlence commented 8 years ago

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'.

danhper commented 8 years ago

@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 commented 8 years ago

I'm working on it https://github.com/tuvistavie/fundle/compare/master...Perlence:repo-subfolder.

danhper commented 8 years ago

@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

danhper commented 8 years ago

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

Perlence commented 8 years ago

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