I was working on the command line, generating one log file after another. One of them turned out to be interesting, and I decided to forward it to a colleague.

The standard procedure now was:

  1. Open Finder,
  2. Look for the file,
  3. Copy that file,
  4. Paste the file in the instant messenger.

With a fresh idea from Tymek Makowski, I can now shorten that process to:

  1. copy.scpt $_, where $_ will contain the last file I worked with,
  2. Paste the file in the instant messenger.

That is two steps shorter, which amounts to 50%!

copy.scpt contents will be:

#!/usr/bin/env osascript

-- copy.scpt

-- Example:
-- $ ./copy.scpt file.png
-- You can now paste the file into a communicator, like Slack or WebEx.

on run (clp)
    if clp's length is not 1 then error "Argument missing: file path"
    set the clipboard to clp's item 1 as «class furl»
end run

Idea and base implementation: Tymek Makowski. Thanks!