Jump to content

The 'action' property of Script Filter items should also override the 'arg' that is used for the file buffer


zeitlings

Recommended Posts

I'm not sure if this behavior is intentional, and if it is, I can't quite understand the reasoning behind it. Perhaps somebody can point out some use cases where this is required.

 

When setting the property action for an item returned by a script filter, this property sets “the Universal Action items used when actioning the result, and overrides the arg being used for actioning.” (See here under action : OBJECT | ARRAY | STRING (optional)). This is great and works fine. However, when pushing the item to the file buffer via ⌥+↑, the arg is still used and not the action. This is unexpected, because whatever I push to the buffer I intend to use in some Universal Action. This is why I think that the action property of Script Filter items should also override the arg that is used for the file buffer.

 

It's not a super big deal, but it is an inconsistency imho. I want to mention it before I go on to write a workaround and forget about it. For some context, here's the problem I ran into:

 

There is this item:

    {
      "title" : "Document Title",
      "arg" : "x-devonthink-item:\/\/819603F0-07C6-4B20-B869-628981866614",
      "action" : "\/path\/to\/file.pdf",
      "type" : "file:skipcheck",      
      "variables" : {
        "trigger" : "launch"
      },
      "valid" : true,
      ...
    }

 

The arg is registered as a URL and when actioning the item, a PDF Document will be opened in DEVONthink using the arg and Alfred’s Open URL file action after checking for the var “trigger” being equal to “launch”. For the file buffer to pick up on the file system path though, it would need to be set as arg. Given that action overrides the arg for Universal Actions, I would expect it to also override the arg for the file buffer since the buffered items all end up being actioned by piping them to the Universal Actions.

 

Thanks for considering it!

 

And one additional feature request: With files in the buffer and the Alfred launch window being empty, have ⌥+↓ pull the last file from the buffer down into the launch window, or even better, cycle through them 🤗

 

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...