I am wavering on whether it is a good idea or not, but perhaps we should use the readline lib (libedit on the mac, originally GNU Readline) when call the readline() function in testkjs, The pro's are that it makes all the normal terminal behaviors (arrow keys, C-a/C-e etc.) available to the user. The con's are that it feel wrong. Not sure why.
This was fixed in r34470: http://trac.webkit.org/changeset/34470