Skip to content

Feature idea: --one-list #3

Description

@bwood

Use case: I'm creating a php data file to serve as a data source for script. E.g. I want to get https:info data into a file so that a script that needs that data doesn't have to exec https:info for each site.

Currently if you choose a terminus option like--format=var_export you (understandably) get multiple arrays:

$ terminus genie --name=example --env=live -- https:info --format=var_export
array (
  'live-upgrade-example-kl-01.pantheon.foobar.com' =>
  array (
    'id' => 'live-upgrade-example-kl-01.pantheon.foobar.com',
    'type' => 'vanity',
    'status' => 'OK',
    'status_message' => 'Launched',
    'deletable' => 'false',
  ),
  'live-upgrade-example-kl-01.pantheonsite.io' =>
  array (
    'id' => 'live-upgrade-example-kl-01.pantheonsite.io',
    'type' => 'platform',
    'status' => 'OK',
    'status_message' => 'Launched',
    'deletable' => 'false',
  ),
)
array (
  'www.open.foobar.com' =>
  array (
    'id' => 'www.open.foobar.com',
    'type' => 'custom',
    'status' => 'OK',
    'status_message' => 'Launched',
    'deletable' => 'true',
  ),
  'live-example.pantheon.foobar.com' =>
  array (
    'id' => 'live-example.pantheon.foobar.com',
    'type' => 'vanity',
    'status' => 'OK',
    'status_message' => 'Launched',
    'deletable' => 'false',
  ),
)

It'd be useful if you could pass --one-list or some named option to get this:

$ terminus genie --name=example --env=live -- https:info --format=var_export
array (
  'live-upgrade-example-kl-01.pantheon.foobar.com' =>
  array (
    'id' => 'live-upgrade-example-kl-01.pantheon.foobar.com',
    'type' => 'vanity',
    'status' => 'OK',
    'status_message' => 'Launched',
    'deletable' => 'false',
  ),
  'live-upgrade-example-kl-01.pantheonsite.io' =>
  array (
    'id' => 'live-upgrade-example-kl-01.pantheonsite.io',
    'type' => 'platform',
    'status' => 'OK',
    'status_message' => 'Launched',
    'deletable' => 'false',
  ),
  'www.open.foobar.com' =>
  array (
    'id' => 'www.open.foobar.com',
    'type' => 'custom',
    'status' => 'OK',
    'status_message' => 'Launched',
    'deletable' => 'true',
  ),
  'live-example.pantheon.foobar.com' =>
  array (
    'id' => 'live-example.pantheon.foobar.com',
    'type' => 'vanity',
    'status' => 'OK',
    'status_message' => 'Launched',
    'deletable' => 'false',
  ),
)

This probably applies to some of the other --format options.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions