clue/commander

Support filtering placeholder and option values

Closed this issue · 2 comments

clue commented

We should add some support for filtering placeholder and option values like this:

base add <offset:int> [--wait[=<timeout:float>]]

We should probably supply some common default filters and also provide an interface to define custom filter functions.

clue commented

For the reference: Filtering may sometimes also be avoided by using preset option values via #6/#17.

clue commented

The tokenizer/parser will be updated via #17 to use the ArgumentToken also for options like above. This means they now share quite a bit of code, so adding filtering to the ArgumentToken should be sufficient here.