On Fri, Jul 11, 2014 at 12:20 PM, glphvgacs <darwinsker...@gmail.com> wrote:

> On Fri, Jul 11, 2014 at 12:14:47PM -0700, Jan-Thorsten Peter wrote:
> > 1. I may visit this directory a few month later and what to know what I
> did
> > here
>
> that's a history size/retention issue.
>

> > 2. Others should be able to see what I did in this directory
> > 3. The history should be shared across multiple computers
> > Storing it in a local file seems like the easiest way to accomplish this
> > and it worked well for me with bash and zsh in the past.
> >
> how did you do it in zsh? by sharing your HISTFILE or all users logged
> into the same machine with the same account and hece the same HISTFILE?
> i believe there is no HISTFILE in fish though. basically no control over
> history which is a missing feature IMHO. i have filed couple of bugs for
> this but nothing so far.
>
>
In zsh it's possible to define the function preexec which gets the command
as parameter before executing the command. It then comes down to just
append these parameter to a file in the current directory (ignoring some
filtering and the date which is saved as well for now). Basically just:
echo $* >>.history.$USER
The file system solves then automatically all other problems of sharing the
history across users and computers.
------------------------------------------------------------------------------
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to