For OSX, have a go at the libedits used by the collab server too