Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: feature idea: customizable string in history file



On 2008-03-08, 13:09, Richard Hartmann wrote:
> The main problem I see is: What happens when you change the
> formatting of your extras? Suddenly, old history files have wrong data.

This should not be a problem as long as it doesn't contain ';'.
As Wayne wrote:
> The parsing code won't care about the extra characters since it just
> skips to the ';' after parsing the first 2 items.

> you are unlikely to have programs called '100' or some such, so the
> history can be re-used by other shells.
I don't think so.  Bash e.g. interprets the extra time stamp as command:

 condor:~>cp .zsh.history .bash_history    
 condor:~>bash
 spiegl@condor:~$ <CURSOR-UP>
 spiegl@condor:~$ : 1204978934:0;cp .zsh.history .bash_history

Bash can save the timestamp too, but does it in an extra line with '#':

 #1200613484
 test
 #1200613490
 history
 #1200613529
 date

Bye,
 Andy.

-- 
 She had a boyfriend with a wooden leg, but broke it off.



Messages sorted by: Reverse Date, Date, Thread, Author