Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to commit my change on one of the Perl scripts? #36

Open
thiagocmoraes opened this issue Jul 27, 2016 · 3 comments
Open

How to commit my change on one of the Perl scripts? #36

thiagocmoraes opened this issue Jul 27, 2016 · 3 comments

Comments

@thiagocmoraes
Copy link

thiagocmoraes commented Jul 27, 2016

Sorry about being kinda lazy, but this is my first attempt modifying an Alfred Workflow and trying to use Perl at the same time.

I want to print the "notes" from a password in subtitle field when doing a search using this workflow like in the image below.
screenshot 2016-07-26 23 36 37

I've changed the code inside Alfred to print all lines split by / and it works fine.

Then I've forked the repo to commit my change, to make it easier to implement it on top of future updates, but I didn't find a way to commit this change as the .alfredworkflow is a binary.

What an I missing?

PS: don't think my code is worth a pull request, at least for now, almost debugging done, but here's the patch file generated if anyone wants to take a look.

Change to lp script I've done

92c92,99
< print qq{<item uid="$id"><arg><![CDATA['$name', '$id']]></arg><title><![CDATA[$name]]></title><subtitle></subtitle><icon>icon.png</icon></item>\n};

---
> my ($notes, $err, $errorCode) = capture {
>     system("export LPASS_ASKPASS=\"/dev/null\" && export LPASS_AGENT_TIMEOUT=\"" . $loginTimeout . "\" && " . $lpass_exec . ' show --notes --sync=no ' . $id);
> };
> 
> $notes =~ s/\n/ \/ /g;
> $notes =~ s/ \/ $//; # get rid of last separator
> 
> print qq{<item uid="$id"><arg><![CDATA['$name', '$id']]></arg><title><![CDATA[$name]]></title><subtitle><![CDATA[$notes]]></subtitle><icon>icon.png</icon></item>\n};

Any pointers?

@stuartcryan
Copy link
Owner

Howdy :) thank you for the idea (and apologies for the delay).

I will have a look and see if there is any way I can do this, the code looks good, however my only concern would be that this would replace the username that is output in the current version (which I know a lot of people find useful).

May I ask what the particular usecase is, i.e. are these only for displaying the contents of a secure note, or are you wanting to see the notes on an individual password entry?

Cheers,
Stuart

@thiagocmoraes
Copy link
Author

Oh wow, I'm using the 1.4.6_beta1 and didn't see the feature about printing the user. This is indeed useful.

About my change, I did it because sometimes a have websites where I need to check a note to choose which entry I should use. I'll see the change about the username, that's probably better for the general use, indeed.

Maybe we could open use left arrow to open the note content in a similar way to Alfred's file browser?

@thiagocmoraes
Copy link
Author

Actually, let me re-phrase the last comment: I want a quick way to access the notes, because it's common to have important information stored together with a password. I will think if there's a better way of doing it, but if you have ideas, I may be up to implement them.

GabLeRoux pushed a commit to GabLeRoux/lastpass-alfred-workflow that referenced this issue Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants