### Method

# Ide CommandProvider get_command_by_id

#### Declaration

    IdeCommand*
    ide_command_provider_get_command_by_id (
      IdeCommandProvider* self,
      IdeWorkspace* workspace,
      const gchar* command_id
    )

#### Description

Looks for a command by `command_id` and returns it if found.

Available since: | 3.34

#### Parameters

`workspace` | `IdeWorkspace`
| An `IdeWorkspace`.
| The data is owned by the caller of the function.
`command_id` | `const gchar*`
| The identifier of the command.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.

#### Return value

Returns: | `IdeCommand`
| An `IdeCommand` or `NULL`.
| The caller of the method takes ownership of the data, and is responsible for freeing it.
| The return value can be `NULL`.