|
From: sfeam <sf...@us...> - 2016-07-13 05:08:09
|
In current cvs (5.1) the numbering shown by the "history" command
is off by one, in the sense that trying to retrieve a command by number
results in execution of the command immediately prior to the one equested.
I think this is because of a change to history.c (write_history_list) on 20 June.
The corresponding entry in ChangeLog seems to be
2016-06-20 Bastian Maerkisch <bma...@we...>
* src/readline.c (write_history_list): Avoid adding extra leading
spaces when saving to a file. Index of history_get is zero-based
relative to history_base.
although it does not mention a change to history.c.
Can someone (Bastian?) clarify whether that change was a fix for
a real problem? If not I think it should be reverted.
On the other hand if it did fix something then a corresponding
change needs to be made in command.c (history_command)
so that the command
history !<lineno>
retrieves <lineno + 1> instead.
Or something like that.
Sourceforge is currently down so I can't confirm the change history
or possible reversion.
Ethan
|