Skip to content

passFields pass-name

passFields returns structured data stored in pass using the pass CLI (pass). pass-name is passed to pass show $PASS_NAME and the output is parsed as colon-separated key-value pairs, one per line. The return value is a map of keys to values.

Example

Given the output from pass:

GitHub
login: username
password: secret

the return value will be the map:

{
    "login": "username",
    "password": "secret"
}

Example

{{ (passFields "GitHub").password }}
Back to top