Robitx/gp.nvim

1Password support for multiple accounts

ERElli opened this issue · 1 comments

Hey there,
I'm attempting to get my openai_api_key from 1password but I'm having an issue with a flag (--account) being recognized. This flag works when used in the command line directly but is failing when used in the gp.nvim config.

I need to use this flag because I have multiple 1password accounts

This is my lazy.nvim config

return {
	"robitx/gp.nvim",
	lazy=false,
	config = function()
		local conf = {
			openai_api_key = {
				"op",
				"read",
				"op://vault/item/field",
				"--account <account url here>",
			},
		}
		require("gp").setup(conf)
	end
}

This is a screenshot of the error I get after <C-g><C-g> to generate a response
image

This an example of a the op read command failing without the account flag and passing with the account flag
image

Thanks!