Jump to content

Shouldn't we be able to invoke Universal Actions on ScriptFilter JSON items even when arg is null?


Recommended Posts

Posted (edited)

Alfred 5.5.2257

 

In light of my recent discovery of the (apparently old) feature in Script Filters where the actionable bit for Universal Actions can be customized via the "action": { ... } key, I've been playing around.

 

One thing I noticed is that for items with null/empty args, the <TAB> key to enter Universal Action picker will not activate. To me, this feels like a bug, or at least an artifically-imposed limitation. Reposting the example JSON from the other thread here.

 

Example - try actioning the "Thing with no arg" item below

 

cat <<EOJ
{ "items": [
  { "title": "Fruit",
    "arg": "Apple",
    "subtitle": "arg='Apple' ua='Orange'",
    "action": {
      "auto": "Orange"
    }
  },
  { "title": "Folder",
    "arg": "~/Documents",
    "subtitle": "arg='~/Documents' ua='~/Desktop'",
    "action": {
      "file": "~/Desktop"
    }
  },
  { "title": "URL",
    "arg": "https://www.alfredapp.com/help/workflows/inputs/script-filter/json/",
    "subtitle": "arg='Alfred JSON help' ua='https://alfredapp.com'",
    "action": {
      "url": "https://alfredapp.com"
    }
  },
  { "title": "Thing with no arg",
    "arg": "",
    "subtitle": "arg='' ua='~/Documents'",
    "action": {
      "file": "~/Documents"
    }
  },
]}
EOJ

 

Edited by luckman212
Link to comment

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...