Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature idea: --one-list #3

Open
bwood opened this issue May 9, 2018 · 0 comments
Open

Feature idea: --one-list #3

bwood opened this issue May 9, 2018 · 0 comments

Comments

@bwood
Copy link

bwood commented May 9, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant