|
1 | | -*op.txt* Last change: 2024 May 28 |
| 1 | +*op.txt* Last change: 2025 August 19 |
2 | 2 |
|
3 | 3 | ============================================================================== |
4 | 4 | Table of Contents *op-table-of-contents* |
@@ -266,9 +266,10 @@ COMMANDS *op-commands* |
266 | 266 | All commands are also available as a Lua API, see API <#api>. Additionally |
267 | 267 | there are two utility methods for grabbing secrets to use in scripting: |
268 | 268 |
|
269 | | -- `require('op').get_secret(item_reference: string): string|nil, string|nil` |
270 | | -- `require('op').get_secret_async(item_reference: string, callback: |
271 | | - fun(secret: string|nil, stderr: string|nil))` |
| 269 | +- `require('op').get_secret(item_reference: string, account: string|nil): |
| 270 | + string|nil, string|nil` |
| 271 | +- `require('op').get_secret_async(item_reference: string, account: string|nil, |
| 272 | + callback: fun(secret: string|nil, stderr: string|nil))` |
272 | 273 | If the CLI integration is enabled in the 1Password desktop app, the field |
273 | 274 | action menu will have an item to "Copy secret reference". You can also go to |
274 | 275 | Settings -> Developer and "Show 1Password Developer experience" to enable the |
@@ -403,9 +404,10 @@ All commands are also available as a Lua API as described below: |
403 | 404 | Additionally there are two utility methods for grabbing secrets to use in |
404 | 405 | scripting: |
405 | 406 |
|
406 | | -- `require('op').get_secret(item_reference: string): string|nil, string|nil` |
407 | | -- `require('op').get_secret_async(item_reference: string, callback: |
408 | | - fun(secret: string|nil, stderr: string|nil))` |
| 407 | +- `require('op').get_secret(item_reference: string, account: string|nil): |
| 408 | + string|nil, string|nil` |
| 409 | +- `require('op').get_secret_async(item_reference: string, account: string|nil, |
| 410 | + callback: fun(secret: string|nil, stderr: string|nil))` |
409 | 411 | Additionally, part of `op.nvim`'s design includes complete bindings to the CLI |
410 | 412 | that you can use for scripting with Lua. This API is available in the `op.api` |
411 | 413 | module. This module returns a table that matches the hierarchy of the |
|
0 commit comments