Compile CoffeeScript on Mac clipboard to JavaScript and print it

pbpaste | coffee -bcsp | tail -n +2
This particular combination of flags mimics Try CoffeeScript (on as closely as possible. And the `tail` call removes the comment `// Generated by CoffeeScript 1.6.3`. See `coffee -h` for explanation of `coffee`'s flags.
Sample Output
foo("abc", function() {
  return "blah";

(given this text on the clipboard:)
foo "abc", ->

What Others Think

The above comment by ?mkmalls39? is spam, but I don't see a way to report it.
roryokane · 419 weeks ago
Javascript is a wonderful language through which web designing is boosting day by day. They are also preferring us to check non-organic coffee because it has some new taste. Keep things up to the mark to have a good mark at the end. This forum has been doing good in this regard.
CooperRaff · 28 weeks and 6 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: