Fix history and add Control+W to readline