summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCooper Maruyama <cooperm@susteen.com>2015-05-01 01:34:20 -0700
committerCooper Maruyama <cooperm@susteen.com>2015-05-01 01:34:20 -0700
commit8e8cdc0502fc35844975548fa268e7ed027d00b7 (patch)
treee5639c8338459e98f73a83951432be8b819358eb
parentff4663a6b83b8dd205da3968de4bc458abc08b2c (diff)
downloadzsh-8e8cdc0502fc35844975548fa268e7ed027d00b7.tar.gz
zsh-8e8cdc0502fc35844975548fa268e7ed027d00b7.tar.bz2
zsh-8e8cdc0502fc35844975548fa268e7ed027d00b7.zip
Add coffeescript aliases: cf, cfc, cfp
cf: compile and show output cfc: compile & copy cfp: compile from pasteboard & print
-rw-r--r--plugins/coffee/coffee.plugin.zsh13
1 files changed, 13 insertions, 0 deletions
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)"'