Jump to content

sindresorhus

Member
  • Posts

    10
  • Joined

  • Last visited

Posts posted by sindresorhus

  1. That's not the user's custom $PATH. That's the default $PATH defined by macOS. And nobody starts Alfred from the command-line.

     

    I meant that when Node.js is installed the `node` binary is not available by default, since it's installed in `/usr/local/bin`, which is by default not in the $PATH in Alfred. Alfy works around this by getting the user's $PATH, so running `node` in Alfred just works when Node.js is installed. This is nice as otherwise you would have to instruct users to manually set the location of the `node` binary.

  2. Currently, if I output the following:

    {"items": [
    	{
    		"title": "Foo",
    		"arg": "unicorn"
    	}
    ]}
    

    I have to handle the `unicorn` arg in a connected output action in the workflow.

     

    It would be useful to be able to dynamically handle it without needing to create an output action. This can be useful for very dynamic results and creating reusable modules that create output with different actions.

     

    I propose adding a `script` property to the JSON format that when specified makes it not pass the output to any connected output action (like `valid: false`) and instead executes the `script` and passes `arg` to it.

    {"items": [
    	{
    		"title": "Foo",
    		"arg": "unicorn",
    		"script": "run-foo.sh"
    	}
    ]}
    

    This would make script filters a lot more powerful.

×
×
  • Create New...