seaneagan / unscripted

Define command-line interfaces using ordinary dart methods and classes.
BSD 3-Clause "New" or "Revised" License
23 stars 10 forks source link

Allow omitting arg to `allowed` callback #67

Closed seaneagan closed 10 years ago

seaneagan commented 10 years ago

Currently with tab-completion the allowed callback must be one of:

Iterable<String> complete(String text);
Future<Iterable<String>> complete(String text);

and it is assumed the output is already filtered (I think?). Should also allow omitting the arg:

Iterable<String> complete();
Future<Iterable<String>> complete();

in which case the returned Iterable will be filtered to match the input text as prefix.