Use selector to implement task subcommand