Add sync_history; fix non-print escapes in prompt.