From 8e8cdc0502fc35844975548fa268e7ed027d00b7 Mon Sep 17 00:00:00 2001 From: Cooper Maruyama Date: Fri, 1 May 2015 01:34:20 -0700 Subject: [PATCH] Add coffeescript aliases: cf, cfc, cfp cf: compile and show output cfc: compile & copy cfp: compile from pasteboard & print --- plugins/coffee/coffee.plugin.zsh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 plugins/coffee/coffee.plugin.zsh diff --git a/plugins/coffee/coffee.plugin.zsh b/plugins/coffee/coffee.plugin.zsh new file mode 100644 index 000000000..96393f66d --- /dev/null +++ b/plugins/coffee/coffee.plugin.zsh @@ -0,0 +1,13 @@ +#!/bin/zsh + +# compile a string of coffeescript and print to output +cf () { + coffee -peb $1 +} +# compile & copy to clipboard +cfc () { + cf $1 | tail -n +2 | pbcopy +} + +# compile from pasteboard & print +alias cfp='coffeeMe "$(pbpaste)"'