|
From: Daniel J S. <dan...@ie...> - 2007-06-04 20:34:23
|
I consolidated all help/history patches into one patch #1729825 and it is ready to go. Give it a try. I guess the following would be the improvements: 1) Help now resolves keywords individually as opposed to a whole line of text (i.e., things like "help se ter post" are understood). The algorithm goes with most matching characters as the "winning" help line, and if there is a tie then it is the most number of whole matches. 2) History is much more robust to recursion detection. I went with an algorithm that will complain if every a command off the history stack is run more than once in a series of history recalls. For example plot x; hist !plot plot x; hist !plot is recursive on the second implementation because it will come back to the same line. This uses dynarray to keep track of the recalled history, which actually turns out to be less code. 3) History now has recall by number, e.g., "hist !123". A bit tricky to implement given the shuffling behavior we have, but I think I've got it. (No sense in numbering the stack if we can't recall by number.) Note, as far as shuffling it would be easy to make an option for that. I point this out because if someone is using recall by number, shuffling of the stack can cause a problem. Dan |