Search PATH for commands matching the prefix
beaugunderson opened this issue · 1 comments
beaugunderson commented
git
does this and I think it would be a great addition to helmsman. I'm working on a project that I want to be easily extensible by others and I specifically want to support one-off scripts in the PATH that can plug in underneath the main app (in any language, like git
supports).
mattmcmanus commented
Interesting idea! So your thinking if your app prefix is superApp-
that it should check all executables in PATH that start with that prefix?
I'm thinking this would be a good optional flag when instantiating helsman
var cli = helmsman({prefix: 'superApp-', includePATH: true})
As I don't have a pressing need for this I don't know if I'll get to it quickly. Please send a pull-request if you feel so inspired!
Just a tech note, to get all executables in PATH:
ls `echo $PATH | sed 's/:/ /g'`