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

Fix paste when using cmd-return #7

Merged
merged 1 commit into from
Mar 31, 2017
Merged

Conversation

dsedivec
Copy link
Contributor

Cmd-return to copy and paste a password wasn't working for me. I think hitting cmd-return was correctly setting action=paste, but it wasn't passing along the password in arg, which resulted in nothing being copied to the clipboard nor pasted when using the modifier.

I am not sure whether this fix is proper here, or whether instead the workflow library should automatically copy the item's arg to a modifier when it is not given, just as it does with variables. Luckily I think you're familiar with the maintainer of that upstream library. ;)

I also added valid=True to the modifier while I was here, to mirror the valid=True in the preceding wf.add_item, though it doesn't seem to be required by Alfred.

Thanks for this useful workflow!

Hitting cmd-return was correctly setting action=paste, but it wasn't
passing along the arg=pw.  I set valid=True while I was here, to mirror
valid=True in the preceding wf.add_item, though it doesn't seem to be
required by Alfred.
@deanishe deanishe merged commit f918408 into deanishe:master Mar 31, 2017
deanishe added a commit that referenced this pull request Mar 31, 2017
@deanishe
Copy link
Owner

Thanks very much.

I am not sure whether this fix is proper here, or whether instead the workflow library should automatically copy the item's arg to a modifier when it is not given, just as it does with variables.

😃 That might not be a bad idea. Could help dummies like me who can't remember what's inherited and what's not…

FWIW, setting valid on the modifier is only necessary to override its parent item's validity. Alfred assigns modifiers their parent item's valid status if they don't have their own.

Perhaps I should add details of exactly what is and isn't inherited to the docs. I might even remember to read them.

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

Successfully merging this pull request may close these issues.

2 participants