pbcopy, no cat
- One minute read - 61 wordsMy friend Josh recently wrote about a common mistake using pbcopy
, Apple’s pasteboard utility.
To paraphrase, the bad version creates a file called pbcopy
:
$ cat .envrc › pbcopy
While the good version sends the file to your clipboard:
cat .envrc | pbcopy
There’s a third approach that avoids cat
entirely, and may sidestep this mistake for some:
pbcopy < .envrc