code: def export_aliases(export_path=None, exclusions=None):
      
      if not export_path:
          export_path = os.path.abspath(ALIAS_FILE_NAME)
  
      alias_table = get_alias_table()
      for exclusion in exclusions or []:
          if exclusion not in alias_table.sections():
              raise CLIError(ALIAS_NOT_FOUND_ERROR.format(exclusion))
          alias_table.remove_section(exclusion)
  
      _commit_change(alias_table, export_path=export_path, post_commit=False)
      logger.warning(POST_EXPORT_ALIAS_MSG, export_path)
docs: Export all registered aliases to a given path, as an INI configuration file.
  
      Args:
          export_path: The path of the alias configuration file to export to.
          exclusions: Space-separated aliases excluded from export.