Forum Discussion

Anonymous's avatar
Anonymous
4 years ago

[47] Show vault name instead of vault ID in `op document list`

Similar to the https://1password.community/discussion/126429/8-9-10-some-suggestions-related-to-output-formatting on displaying the vault name for op item list, it would be great to display the vault name for op document list as well when using human-readable output format to be consistent.

Current output:


ID TITLE FAVORITE SIZE VAULT CREATED EDITED
<id-1> abcd false 10 KB o2mtrv7bzra2degf2524ffnque 6 months ago 6 months ago
<id-2> efgh false 996 bytes o2mtrv7bzra2degf2524ffnque 6 months ago 6 months ago
<id-3> mnop false 148 bytes dsjd7lez5qjv57sjpjb2otc4ay 2 weeks ago 2 weeks ago


1Password Version: 2.0.0-beta.11
Extension Version: Not Provided
OS Version: macOS 12.0.1 21A559 arm64

3 Replies

  • Anonymous's avatar
    Anonymous

    @"Horia.Culea_1P" It feels like an inconsistency to me, but this might be a conscious choice.

    ```
    ❯ op item list --categories "Software License"
    ID TITLE FAVORITE VAULT CATEGORY CREATED EDITED
    7ify46oeq5dxjbfun5ute2hysu iStat Menus false Personal SOFTWARE_LICENSE 2 months ago 2 months ago
    cw45vpywwjhu7amli4onmdjj3i TextSniper false Personal SOFTWARE_LICENSE 4 months ago 4 months ago
    qs553wwdpbejnbmxzff6ze2cki SoundSource false Personal SOFTWARE_LICENSE 2 months ago 2 months ago

    ❯ op item list --categories SOFTWARE_LICENSE
    [ERROR] 2022/02/01 02:52:58 Unknown item category SOFTWARE_LICENSE
    ```

    Currently, the category value during op item list shows the category value in uppercase separated by underscores, whereas the accepted values for categories are strings documented https://developer.1password.com/docs/cli/reference/management-commands/item#item-list-flags. Ideally it would be great if both are supported. If not, using the same category name as in the documentation would remove ambiguity. Personally, I would prefer using SOFTWARE_LICENSE rather than Software License as I don't have to quote or escape the strings in scripts.

  • Anonymous's avatar
    Anonymous

    Thank you! I haven’t found any other inconsistencies - but I’ll remember to post them here if I do.

  • Anonymous's avatar
    Anonymous

    Hey @smanojkarthick, thank you for trying our CLI.
    This is an amazing suggestion, I am going to take it up with my team as soon as possible.
    Have you noticed any other inconsistent behaviour, such as this, anywhere else in the CLI?
    We're looking forward to hearing any other feedback that you may have.

    Best,
    Horia