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

Re: history-beginning-local function



"Richard Hartmann" wrote:
> On Mon, Jul 14, 2008 at 20:48, Richard Hartmann
> <richih.mailinglist@xxxxxxxxx> wrote:
> 
> 
> > PS: Yes, I did read the part about manual seeding of the file. I still like
>  it
> > a lot!
> 
> The part I apparently did not read was 'local directory'. Sorry, for the
> noise, I misinterpreted the purpose of this function.

Actually, it wouldn't be hard to add a session cookie to the context
giving you separate history files for separate sessions---the context
mechanism is flexible enough that this is really quite easy.  I'm
already adding the directory to the end of the context.  The history
file variable could be a list, so you you could specify

  zstyle ":zhist:$SOME_SESSION_COOKIE:*" local-history-file \
    .zsh_local_history ~/.history_$SOME_SESSION_COOKIE

or whatever.  (I've decided something other than :zle: would be more
appropriate.)

There's no reason why the resulting mechanism shouldn't have a "local"
history in a more general sense than I originally intended.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



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