|
From: <pl...@pi...> - 2013-12-14 12:59:02
|
On 12/14/13 08:58, Ethan Merritt wrote: > On Tuesday, 19 November 2013 05:29:58 PM pl...@pi... wrote: >> On 11/19/13 16:24, Petr Mikulik wrote: >>> There is no option to switch "history" between "compact" and "full" >>> recording. That could be probably added... >>> >>> --- >>> Petr Mikulik >> >> that would be nice and presumably pretty trivial to just stop it doing >> the compacting. >> >> >> If anyone can point me at the relevant code I will have a poke. >> >> thx, Peter. > > I think you can replace the entire #ifdef clause at command.c(rlgets) lines 2718-2751 > with the single line > add_history(line); > > This works for all three cases of the #ifdef. > Note that the built-in readline already acts this way. > > An intermediate option would be to suppress only duplication of the > previous command. This is what the comments say the libedit version > does, but the code seems to contradict that (I have not tried it). > I think you could get that behavior by replacing > found = history_search(line, -1); > with > found = 0; > but again I have not tested. > > Ethan > Thanks Ethan, I'll try to find time to check that out. It's about time a did fresh build anyway. Peter. |