oh-my-zsh/plugins/coffee/coffee.plugin.zsh
Andrew Janke 5c8b0cc0c1 Add clipcopy() and clippaste() generic cross-platform CLI clipboard functions.
Change copydir, copyfile, and coffee plugins to use them, instead of the Mac-only `pbcopy` command.
2015-08-18 03:49:51 -04:00

17 lines
300 B
Bash

#!/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='coffeeMe "$(clippaste)"'
# compile from clipboard and copy to clipboard
alias cfpc='cfp | clipcopy'