Hi,
I'm trying to setup a per directory history by saving each command executed
in a directory to a local file. It come down to add a line like this:
   echo (date +%F.%H-%M-%S) $history[1] >> .history.$USER
to the fish_prompt function. The problem is that $history[1] does not
contain the current command, but the previous.
So if the previous command was "echo FOO" and the current command is "echo
BAR" it would save "echo FOO" to the history file instead of "echo BAR".
Is there a way to get the current command?
Beside is it also possible to execute a function like this before the
actual command is executed and not like the fish_prompt function after the
command already finished?
Any other way to saving the current command to a file in the current
directory?

P.S.: I've just giving fish a try for a few days coming from zsh. So far
really impressive! It gives me a shell that behaves the way I like it with
a lot less configuration effort. Thanks a lot for your work!
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to