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.
This commit is contained in:
Andrew Janke 2015-08-17 22:53:45 -04:00
commit 5c8b0cc0c1
4 changed files with 80 additions and 9 deletions

View file

@ -6,11 +6,11 @@ cf () {
}
# compile & copy to clipboard
cfc () {
cf $1 | pbcopy
cf $1 | clipcopy
}
# compile from pasteboard & print
alias cfp='coffeeMe "$(pbpaste)"'
# compile from clipboard & print
alias cfp='coffeeMe "$(clippaste)"'
# compile from pasteboard and copy to clipboard
alias cfpc='cfp | pbcopy'
# compile from clipboard and copy to clipboard
alias cfpc='cfp | clipcopy'