Factorize out current_tasks_*command