8e8cdc0502fc35844975548fa268e7ed027d00b7
- Author
- Cooper Maruyama <cooperm@susteen.com>
- Committer
- Cooper Maruyama <cooperm@susteen.com>
- Date
Message
Add coffeescript aliases: cf, cfc, cfp
cf: compile and show output
cfc: compile & copy
cfp: compile from pasteboard & print
Diff
1diff --git a/plugins/coffee/coffee.plugin.zsh b/plugins/coffee/coffee.plugin.zsh
2new file mode 100644
3index 0000000000000000000000000000000000000000..96393f66de3ca1f071685eb5aad9b84c3df4c0ee
4--- /dev/null
5+++ b/plugins/coffee/coffee.plugin.zsh
6@@ -0,0 +1,13 @@
7+#!/bin/zsh
8+
9+# compile a string of coffeescript and print to output
10+cf () {
11+ coffee -peb $1
12+}
13+# compile & copy to clipboard
14+cfc () {
15+ cf $1 | tail -n +2 | pbcopy
16+}
17+
18+# compile from pasteboard & print
19+alias cfp='coffeeMe "$(pbpaste)"'