[PATCH] cli: factor out config handling code to get/set lists.