Add rest command and trim items in list command