|
1 | | -*op.txt* Last change: 2024 March 18 |
| 1 | +*op.txt* Last change: 2024 May 28 |
2 | 2 |
|
3 | 3 | ============================================================================== |
4 | 4 | Table of Contents *op-table-of-contents* |
@@ -266,10 +266,16 @@ 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_name: string, field_name: string): |
270 | | - string|nil, string|nil` |
271 | | -- `require('op').get_secret_async(item_name: string, field_name: string, |
272 | | - callback: fun(secret: string|nil, stderr: string|nil))` |
| 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))` |
| 272 | +If the CLI integration is enabled in the 1Password desktop app, the field |
| 273 | +action menu will have an item to "Copy secret reference". You can also go to |
| 274 | +Settings -> Developer and "Show 1Password Developer experience" to enable the |
| 275 | +"Copy UUID" actions in the field and item action menus and the right click |
| 276 | +menu on vaults. To get an account UUID, run `op account list` and copy the |
| 277 | +`USER ID` field. |
| 278 | + |
273 | 279 |
|
274 | 280 | ------------------------------------------------------------------------------ |
275 | 281 | FEATURES *op-features* |
@@ -397,10 +403,9 @@ All commands are also available as a Lua API as described below: |
397 | 403 | Additionally there are two utility methods for grabbing secrets to use in |
398 | 404 | scripting: |
399 | 405 |
|
400 | | -- `require('op').get_secret(item_name: string, field_name: string): |
401 | | - string|nil, string|nil` |
402 | | -- `require('op').get_secret_async(item_name: string, field_name: string, |
403 | | - callback: fun(secret: string|nil, stderr: string|nil))` |
| 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))` |
404 | 409 | Additionally, part of `op.nvim`'s design includes complete bindings to the CLI |
405 | 410 | that you can use for scripting with Lua. This API is available in the `op.api` |
406 | 411 | module. This module returns a table that matches the hierarchy of the |
@@ -433,4 +438,4 @@ See lua/op/types.lua <./lua/op/types.lua> for type annotations describing the |
433 | 438 | completions when using `lua-language-server`. |
434 | 439 |
|
435 | 440 |
|
436 | | -vim:tw=78:ts=8:ft=help:norl: |
| 441 | +vim:tw=78:ts=8:ft=help:norl: |
0 commit comments