window: use readline for handling line input