generalize all list command into simple functions.
Merge pull request #84 from sbotman/gen_list_cmd

generalize all list command into simple functions.