Quicksilver

ExecutableFileActions

An executable file [1] placed in ~/Library/Application Support/Quicksilver/Actions/ can be used to define an action.

The following is my current guess about how these actions work:

  1. If QS is instructed to execute a command whose action (second pane value) is an 'executable file action', the direct object (first pane value) is passed to the corresponding executable via argv
  2. If the running executable writes to STDOUT, the output becomes available via the command window as the value of the direct object (first pane)
  3. It may be necessary to restart QS once the file is added to the Actions directory before QS recognizes the file

AFAIU, actions of these sorts only handle string or file objects [2]. Also, it may be necessary to name the executable file w/ an appropriate file extension (e.g. .sh, .py, .pl, etc.)

[1] For example, a file which has been made executable by, say, applying chmod to it via Terminal.app (e.g. chmod 755 filename).

[2] The comma trick also appears to work, although if using the comma trick, it appears that only a collection of things of the same type work -- i.e. if you try to "select" multiple things using the comma trick and they are not all of the same type, the action does not come up in the second pane. Note that URLs seem to be considered strings so you appear to be able to pass strings along with URLs.

Comments

!/usr/bin/env perl -w

confirms that both text and files get passed in via argv

open(OUT, '>>/path/to/quicksilver.log') or die('failed to open log file'); print OUT map("$_\n", 'ARGV:', @ARGV); print OUT "STDIN\n", <STDIN>, "\n"; print STDOUT "this is STDOUT\n";

Thanks for the confirmation. I also confirmed it for QS B51 (3800) and I intend to update the main text appropriately.