On minGW host, history file are open in text mode, that's imply windows specific carriage return to be inserted ( \n -> \r\n conversion performed) and prevents windows history file to be compliant with linux one's. When using current history file for windows, "^M" appears at each end of line. This patch fixes this problem. -- Denis