Archive for April, 2009

Accessing the clipboard from OS X command-line

Posted by michael on April 22nd, 2009 under OS X
Tags:  •  3 Comments

pbcopy and pbpaste are the OS X alternatives to the POSIX tool xclip.
pbcopy takes the standard input and places it in the specified paste-board. If no pasteboard is specified, the general pasteboard will be used by default.
pbpaste removes the data from the pasteboard and writes it to the standard output.
For example:
user@host:~/Projects/some/dir/that/is/long$ pwd | pbcopy
The working [...]

Coloured, paged subversion diff output on Linux-like computers

Posted by michael on April 1st, 2009 under subversion
 •  1 Comment

Using subversion from the command line (svn), I often complained (to myself at least) about the bland output from a svn diff command. This isn’t strictly a subversion problem, since your regular diff gives the same uninspired output.
Here’s how to add automatic paging and highlight changes in bright colours.
Install colordiff on Ubuntu:
apt-get install colordiff
OS X:
port [...]