# `ComposerNew.Command`
[🔗](https://github.com/elixir-composer/composer/blob/v0.3.0/lib/composer_new/command.ex#L1)

One command of a `ComposerNew.Plan`: an executable and its arguments,
run in `cd` (`nil` for the current directory). `label` says which part
of the run it is: `:create`, `:install`, `:record` or `:run`.

# `label`

```elixir
@type label() :: :create | :install | :record | :run
```

# `t`

```elixir
@type t() :: %ComposerNew.Command{
  args: [String.t()],
  cd: Path.t() | nil,
  cmd: String.t(),
  label: label()
}
```

# `escape`

```elixir
@spec escape(String.t()) :: String.t()
```

Quotes `arg` for a POSIX shell, unless it is made of safe characters only.

# `join`

```elixir
@spec join([String.t()]) :: String.t()
```

Joins arguments into one shell-quoted line.

# `to_string`

```elixir
@spec to_string(t()) :: String.t()
```

The command as a shell would take it, each argument quoted when it
needs to be, for printing and for retry hints.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
