The `gh cs ssh` command suggests an example recipe for setting up
openssh integration. The last step appends an `Include` statement to the
user's `~/.ssh/config`.
Unfortunately, this won't always work as intended. If the existing
configuration ends with a `Host` block, the added `Include` statement
will be conditional on whether that block matches.
By preceding the `Include` statement with `Match all`, we can ensure
that it is always evaluated.
Since the API already disallows this, this makes the error cleaner and
more explicit when a user is trying to start/ssh into a codespace that
has a pending operation.
Example of the old error message:
```
$ gh cs ssh -c cwndrws-redacted
Starting codespace ⣽error connecting to codespace: error starting codespace: HTTP 422: your codespace has an operation pending: updating to a sku with a different amount of storage; please wait until this operation is complete (https://api.github.com/user/codespaces/cwndrws-redacted/start)
exit status 1
```
Example of the new error message:
```
$ gh cs ssh -c cwndrws-redacted
codespace is disabled while it has a pending operation: Changing machine types...
exit status 1
```
This is to avoid having to explicitly pass it to each subcommand that
needs it. Each codespaces command runs in the context of App, so that's
a point of shared context that we can store state in.
cmdutil.Factory.Executable() accounts for things like package managers
and symlinks to the actual executable.
An alternative to passing the *cmdutil.Factory down the stack would be
stashing the executable string in the codespace.App, which works (and
the diff is smaller), but it produced some odd non-local test failures.
This way seems less mysterious and more like other uses of Factory in
the codebase.
When running `gh cs ssh config` without a `-c` option, we skip
codespaces that aren't available. This change suppresses that behavior
when a single codespace is explicitly requested, starting the codespace
if it's not running.