Skip to content

vault list returns vault name and ID as single value #36

@hortonew

Description

@hortonew

I'm not sure if this is intentional but:

 vault list op/vaults

returns something like the following, containing vault name and vault id:

vault1 abcdef123456
vault2 zyxwvu987654
...

adding -format=json which is vault specific, not 1pass specific outputs a list of strings:

vault list --format=json op/vaults
[
  "vault1 abcdef123456", 
  "vault2 zyxwvu987654",
...
]

Is there a way to output these in a list of maps/dictionarys so parsing for the vault name to vault id mapping doesn't need to occur after listing? In the case of vaults with spaces, it's harder to use this integration because we first need to look up the vault ID and then figure out the ID of the vault.

Ideal output:

[
  {"name": "vault1", "id": "abcdef123456"},
  {"name": "vault2", "id": "zyxwvu987654"},
  ...
]

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