I'd like to define a command line app "cla" with commands "foo", "bar", and "find" such that:
./cla foo
and ./cla fo
both invoke the method defined for foo
./cla find
and ./cla fi
both invoke find
./cla bar
and ./cla b
both invoke the method defined for bar
./cla f
throws an error
Or something reasonably similar. Hopefully this is clear.
It's not obvious that this can be done in Thor or Commander. I haven't looked at Slop. Do any of the ARGV processor libraries have this ability? Can somebody tell me which libraries, and point me to documentation of the feature?
EDIT: To be clear, I'm not asking for help solving the specific problem above. I'm asking whether it is possible (and not too difficult) to do it with one of the standard command line app builder libraries, which provide many useful features I want besides the ability to invoke a command by a prefix of its name.