Added readline-like interface