Skip to content

Escape character for 1Password CLI - Windows PowerShell #497

Open
@prboyer

Description

@prboyer

op CLI version

2.30.3

Goal or desired behavior

A credential with a special character in the item name can be retrieved using the 1Password CLI in Windows PowerShell with the syntax:
op read op://employee/DOMAIN\\user/username

Current behavior

Trying to retrieve a secret from my Employee vault using the CLI fails when a special character in the path.
E.g. op read op://employee/DOMAIN\user/username

I've also tried escaping the backslash per the documentation.
op read op://employee/DOMAIN\\user/username

And when using PowerShell adding the path in double quotes does not work either
op read "op://employee/DOMAIN\user/username"

Relevant log output

[ERROR] 2024/11/14 11:26:24 could not read secret 'op://employee/DOMAIN\user/username': invalid secret reference 'op://employee/DOMAIN\user/username': invalid character in secret reference: '\'

Metadata

Metadata

Assignees

No one assigned

    Labels

    op-cliFunctionality to be implemented in 1Password CLI. Needs to be done by 1Password Developers.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions