While trying to port hand-written argument parser, I noticed that there's currently no way to configure an option that may occur multiple times and accumulates the arguments:
grep -e 'foo' -e 'bar'
This is how I'd like this to work:
export class GrepOptions extends Options {
@param({multi: true}) public e: string[];
}
@command()
export default class extends Command {
@metadata
public execute(options: GrepOptions) {
console.log(options.e); // ['foo', 'bar']
}
}
While trying to port hand-written argument parser, I noticed that there's currently no way to configure an option that may occur multiple times and accumulates the arguments:
This is how I'd like this to work: