Added support for command history (alt-x arrow keys).

Leo build: 20141109044407