def rename(watson, rename_type, old_name, new_name):
    """
    Rename a project or tag.

    Example:

    \b
    $ watson rename project read-python-intro learn-python
    Renamed project "read-python-intro" to "learn-python"
    $ watson rename tag company-meeting meeting
    Renamed tag "company-meeting" to "meeting"

    """
    if rename_type == 'tag':
        watson.rename_tag(old_name, new_name)
        click.echo('Renamed tag "{}" to "{}"'.format(
                        style('tag', old_name),
                        style('tag', new_name)
                   ))
    elif rename_type == 'project':
        watson.rename_project(old_name, new_name)
        click.echo('Renamed project "{}" to "{}"'.format(
                        style('project', old_name),
                        style('project', new_name)
                   ))
    else:
        raise click.ClickException(style(
            'error',
            'You have to call rename with type "project" or "tag"; '
            'you supplied "%s"' % rename_type
        ))

    Rename a project or tag.

    Example:

    
    $ watson rename project read-python-intro learn-python
    Renamed project "read-python-intro" to "learn-python"
    $ watson rename tag company-meeting meeting
    Renamed tag "company-meeting" to "meeting"

    
watson/cli.py