Coder Social home page Coder Social logo

Comments (2)

jodyheavener avatar jodyheavener commented on August 22, 2024

Hi @cycle4passion, thanks for filing this ticket. Apologies it's taken a while to review it. I am trying to reproduce this issue and am having a different result:

  • With the line PUBLIC_APP_URL=127.0.0.1:5000 and the selection 127.0.0.1:5000
  • Running the 1Password: Save in 1Password command results in no suggestion for "What do you want to call this item?" and "value" for "What do you want this field to be called?"
  • Upon completing these fields the selection is replaced with a secret reference

If you're able to, can you try to reproduce your issue and outline the steps you took? Thank you!

from op-vscode.

cycle4passion avatar cycle4passion commented on August 22, 2024

I agree, its been awhile. As I read what I wrote previously, I can't even understand it. I will try again. First off the the steps you propose do work.

Lets start with a different example first

// .env
AAA_API_KEY=1234

I highlight 1234 and invoke 'Save in 1Password'.

I am asked What do you want to call this item?

This is ambiguous, at that point (having not created one before), I am unsure if you mean the name of the 1Password entry, or the name of the key within that item. Maybe the text would be clearer as 'What do you want to call this 1Password item?'. It does become clearer when posed the second question 'What do you want this field to be called?'. Nevertheless the remainder of the steps work correctly.

Feature request: The name for 1Password field is available on the same line as the highlighted text to be stored in 1Password. The extension could read the entire line which has selected text within it and regex the 1PW field name (everything before =). This could then be the default that in the What do you want this field to be called? prompt. There may be use cases I am not considering beyond .env files??

Now second example. Assume this is the first time I have used this extension.

// .env
POCKETBASE_URL=http://127.0.0.1:8090

I highlight http://127.0.0.1:8090 and invoke 'Save in 1Password'.
What do you want to call this item? - I enter "POCKETBASE"
What do you want this field to be called? - the default says url.

I think, well I just named it in the last step and, yes, its a URL so I guess that's good enough and hit enter. I receive an error: Command '1Password: Save in 1Password' resulted in an error - Cannot read propertied of undefined (reading 'reference'). I click OK, and popup at bottom says Item titled "POCKETBASE" save successfully to your vault. I check and it did save it.

Unlike in my first example where you can accept value as the default for the field name, you cannot accept url as default. I looks like trying to store in url is handled differently than 1PW custom fields. I would pose the the default should not be url to prevent this error. I understand without the http:// this is a non-issue, but how am I to know that? It definitely seems weird to highlight only part of the value http://127.0.0.1:8090 to store in 1Password.

from op-vscode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.