code: def macro_list(self, args: argparse.Namespace) -> None:
          
          if args.name:
              for cur_name in utils.remove_duplicates(args.name):
                  if cur_name in self.macros:
                      self.poutput("macro create {} {}".format(cur_name, self.macros[cur_name].value))
                  else:
                      self.perror("Macro '{}' not found".format(cur_name), traceback_war=False)
          else:
              sorted_macros = utils.alphabetical_sort(self.macros)
              for cur_macro in sorted_macros:
                  self.poutput("macro create {} {}".format(cur_macro, self.macros[cur_macro].value))
docs: List some or all macros