Browse Source

Add coffeescript aliases: cf, cfc, cfp

cf: compile and show output
cfc: compile & copy
cfp: compile from pasteboard & print
Cooper Maruyama 10 years ago
parent
commit
8e8cdc0502
1 changed files with 13 additions and 0 deletions
  1. 13 0
      plugins/coffee/coffee.plugin.zsh

+ 13 - 0
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)"'