On Thu, 2015-03-26 at 15:21 -0400, Chet Ramey wrote: > What do you mean "ignore its effect"? You have newlines embedded in > history entries; what do you plan to do about them? Well that was just the uneducated idea based on blind assumptions by *not* having read the code O:-)
AFAIU, both already works: - if cmdhist=on lithist=off => we get the "if true; then echo foo ; fi" layout for both history and history file + in both cases each command stays "one command". - if cmdhist=on lithist=on => we get the layout with embedded newlines in the history (with each command staying "one command"), but in the history file it "breaks" and the multiline command is split up in several commands Right? So why not make a thrid mode like: - if cmdhist=on lithist=not-in-file which keeps: if true; then\n echo foo\n fi in the history but writes the serialised "if true; then echo foo ; fi" to the history file. Of course on re-loading the history it would again be the form without \n, but better having the serialised form than mutliple commands. And it would then at least work for the current command history Cheers, Chris.