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

Re: feature idea: customizable string in history file



On Sat, Mar 8, 2008 at 1:25 PM, Andy Spiegl <zsh.Andy@xxxxxxxxx> wrote:

>  This should not be a problem as long as it doesn't contain ';'.

If
  timestamp;execution;user;computername;command
changes to
    timestamp;execution;computername;user;command
it would be. Same for
    timestamp;execution;user$whatevercomputername;command
etc, etc. This would, of course, be the user's fault, but still.


> > 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:

Yes, that is the reason why ZSH does it that way. So other shells will only
execute numeric 'commands' which should, hopefully, be safe. That's what
I meant about it being a problem to store other data.

Come to think of it, it _could_ be done like
  timestamp;execution;zsh_hist_save(user,computername);command
or even
  timestamp;execution;echo 'user,computername';command


Richard



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