diff -u -r Io-2007-04-30/Makefile Io-mine/Makefile
--- Io-2007-04-30/Makefile	2007-04-28 15:09:52.000000000 +0200
+++ Io-mine/Makefile	2007-05-28 23:06:34.000000000 +0200
@@ -63,6 +63,9 @@
 BINARY_SUFFIX := .exe
 endif
 
+# Uncommment to use readline
+DLL_EXTRA_LIBS = -lreadline
+
 ###########################
 
 date := $(shell date +'%Y-%m-%d')
@@ -84,7 +87,7 @@
 
 addons: vm
 	./_build/binaries/io_static$(BINARY_SUFFIX) build.io
-	@if [ -f errors ]; then cat errors; rm errors; fi
+	if [ -f errors ]; then cat errors; rm errors; fi
 
 vmlib:
 	mkdir -p _build || true
@@ -96,6 +99,7 @@
 	mkdir -p _build/headers || true
 	cp libs/*/_build/headers/* _build/headers
 
+.PHONY: install
 # Unlink the io binary before copying so running Io processes will keep running
 install:
 	umask 022
diff -u -r Io-2007-04-30/Makefile.lib Io-mine/Makefile.lib
--- Io-2007-04-30/Makefile.lib	2007-04-28 15:09:52.000000000 +0200
+++ Io-mine/Makefile.lib	2007-05-28 22:51:38.000000000 +0200
@@ -52,6 +52,10 @@
 # Uncommment for Coros to register their stack with Valgrind
 #CFLAGS += -DUSE_VALGRIND
 
+# Uncommment to use readline
+CFLAGS += -DWITH_READLINE
+DLL_EXTRAS = -lreadline
+
 ### PLATFORM #####################################################
 
 SYS ?= $(shell uname -s)
diff -u -r Io-2007-04-30/libs/basekit/source/UArray_stream.c Io-mine/libs/basekit/source/UArray_stream.c
--- Io-2007-04-30/libs/basekit/source/UArray_stream.c	2007-04-28 15:09:52.000000000 +0200
+++ Io-mine/libs/basekit/source/UArray_stream.c	2007-05-28 23:23:43.000000000 +0200
@@ -8,6 +8,10 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <stddef.h>
+#ifdef WITH_READLINE
+# include <readline/readline.h>
+# include <readline/history.h>
+#endif
 
 // read ------------------------------------------------------
 
@@ -84,33 +88,49 @@
 {
 	int readSomething = 0;
 	
-	if(self->itemSize == 1)
+	if(self->itemSize != 1)
 	{
-		char *s = (char *)io_calloc(1, CHUNK_SIZE);
-		
-		while (fgets(s, CHUNK_SIZE, stream) != NULL)
+		return 0;
+	}
+#ifdef WITH_READLINE
+        rl_instream = stream;
+	char *s = readline(">");
+	if (s)
+	{
+		if (*s)
 		{
-			char *eol1 = strchr(s, '\n');
-			char *eol2 = strchr(s, '\r');
+			add_history(s);
+			UArray_appendCString_(self, s);
+		}
+		readSomething = 1;
+		free(s);
+	}
+#else
+        char *s = (char *)io_calloc(1, CHUNK_SIZE);
+		
+	while (fgets(s, CHUNK_SIZE, stream) != NULL)
+	{
+		char *eol1 = strchr(s, '\n');
+		char *eol2 = strchr(s, '\r');
 			
-			readSomething = 1;
+		readSomething = 1;
 			
-			if (eol1) { *eol1 = 0; } // remove the \n return character
-			if (eol2) { *eol2 = 0; } // remove the \r return character
+		if (eol1) { *eol1 = 0; } // remove the \n return character
+		if (eol2) { *eol2 = 0; } // remove the \r return character
 			
-			if (*s)
-			{
-				UArray_appendCString_(self, s);
-			}
+		if (*s)
+		{
+			UArray_appendCString_(self, s);
+		}
 			
-			if (eol1 || eol2)
-			{
-				break;
-			}
+		if (eol1 || eol2)
+		{
+			break;
 		}
-		
-		io_free(s);
 	}
+		
+	io_free(s);
+#endif
 	
 	return readSomething;
 }
diff -u -r Io-2007-04-30/tools/Makefile Io-mine/tools/Makefile
--- Io-2007-04-30/tools/Makefile	2007-04-28 15:09:52.000000000 +0200
+++ Io-mine/tools/Makefile	2007-05-28 22:55:10.000000000 +0200
@@ -27,6 +27,7 @@
 CFLAGS = $(OPTIMIZE) $(WARN)
 LFLAGS :=
 #LFLAGS +=-lMallocDebug
+LFLAGS += -lreadline
 LIBS := $(sublibs_l)
 
 LINKDIRFLAG := -L
@@ -68,7 +69,7 @@
 DLL_SUFFIX := dylib
 DLL_COMMAND := -dynamiclib
 FLAT_NAMESPACE := -flat_namespace
-FIXDLL := install_name_tool _build/binaries/io$(BINARY_SUFFIX) -change _build/dll/libiovmall.dylib @executable_path/libiovmall.dylib
+FIXDLL := install_name_tool _build/binaries/io$(BINARY_SUFFIX) -change _build/dll/libiovmall.dylib $(INSTALL_PREFIX)/lib/libiovmall.dylib
 endif
 
 ifeq ($(SYS),IRIX)
@@ -124,7 +125,6 @@
 #_build/binaries/io: _build/objs/main.o
 	#$(CC) $(CFLAGS) $(FLAT_NAMESPACE) $(LFLAGS) -o _build/binaries/io$(BINARY_SUFFIX) _build/objs/main.o ../_build/dll/libiovmall.$(DLL_SUFFIX)
 	$(LINK) $(FLAT_NAMESPACE) $(LFLAGS) $(LINKOUTFLAG)_build/binaries/io$(BINARY_SUFFIX) _build/objs/main.o $(LINKDIRFLAG)../_build/dll $(LINKLIBFLAG)iovmall$(DLL_LIB_SUFFIX)
-
 	$(FIXDLL)
 
 clean:
