-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add onepasswordRead template function
- Loading branch information
Showing
6 changed files
with
83 additions
and
6 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
assets/chezmoi.io/docs/reference/templates/1password-functions/onepasswordRead.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# `onepasswordRead` *url* [*account*] | ||
|
||
`onepasswordRead` returns data from [1Password](https://1password.com/) using | ||
the [1Password | ||
CLI](https://support.1password.com/command-line-getting-started/) (`op`). *url* | ||
is passed to `op read $URL`. If *account* is specified, the extra arguments | ||
`--account $ACCOUNT` are passed to `op`. | ||
|
||
If there is no valid session in the environment, by default you will be | ||
interactively prompted to sign in. | ||
|
||
!!! example | ||
|
||
The result of | ||
|
||
``` | ||
{{ onepasswordRead "op://vault/item/field" }} | ||
``` | ||
|
||
is equivalent to calling | ||
|
||
```console | ||
$ op read op://vault/item/field | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters