summaryrefslogtreecommitdiff
path: root/oh-my-zsh/plugins/coffee/coffee.plugin.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'oh-my-zsh/plugins/coffee/coffee.plugin.zsh')
-rw-r--r--oh-my-zsh/plugins/coffee/coffee.plugin.zsh16
1 files changed, 16 insertions, 0 deletions
diff --git a/oh-my-zsh/plugins/coffee/coffee.plugin.zsh b/oh-my-zsh/plugins/coffee/coffee.plugin.zsh
new file mode 100644
index 0000000..6d1ce5c
--- /dev/null
+++ b/oh-my-zsh/plugins/coffee/coffee.plugin.zsh
@@ -0,0 +1,16 @@
+#!/bin/zsh
+
+# compile a string of coffeescript and print to output
+cf () {
+ coffee -peb "$1"
+}
+# compile & copy to clipboard
+cfc () {
+ cf "$1" | clipcopy
+}
+
+# compile from clipboard & print
+alias cfp='cf "$(clippaste)"'
+
+# compile from clipboard and copy to clipboard
+alias cfpc='cfp | clipcopy'