code: def list_alias():
      
      alias_table = get_alias_table()
      output = []
      for alias in alias_table.sections():
          if alias_table.has_option(alias, 'command'):
              output.append({
                  'alias': alias,
                  # Remove unnecessary whitespaces
                  'command': ' '.join(alias_table.get(alias, 'command').split())
              })
  
      return output
docs: List all registered aliases.
  
      Returns:
          An array of  dictionary containing the alias and the command that it points to.