Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
adding history logging "automagically" :)
- X-seq: zsh-workers 23667
- From: "Joe D" <joe.divola@xxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: adding history logging "automagically" :)
- Date: Mon, 9 Jul 2007 13:41:08 -0400
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=IlHW0anL/H8BOzN5ZYux45YxVB2ubNkXfuvvEXaa6TRsr5ALyQxzXC0MJZxyLhpMZ71ANswv5XrpxRg28f6Dva3D8p5gyl102hArQ0WsntOF4CtT5X+w6ZFFDR4/dB7xYnu8P2HFoBOSr96ktlY+cFG2lpUDEQ0UexLYXJLoVVw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=EWPXYF743XWQ/BRrybe1M5dwVRt5inEsAWW58Zkycx/o75gwubj633kmZq6i0IU4/d6ECsiJrtfq7Gr1qhQdxz1ppiGQyXJ1CorXuJePW5BBsXyxxTmoAEUZsmqsNthYbROBATyhMnBGrBBW2Nx0HYzKM4FIaVe7rePRn/ZNwxQ=
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
Hi all,
We have two user accounts which groups use for a few diff
purposes, and to ease our debugging of what went wrong when things
crash with our tools, we want a nice easy way to find out what was last
done on the system (as opposed to the user not having any idea what the
previous user did). So essentially, these two user accounts (who
already use 'zsh') will always log to a file that not everyone has to
know about (just the support teams). This doesn't take into
account users who switch shells, etc, but this will give us info for
about 90% of our problems.
So in a nutshell, all I want to do is modify 'zsh' source to always do
the following options automatically (regardless of if these lines are
present or not):
HISTSIZE=1000
SAVEHIST=1000
HISTFILE=/opt/some_location/.user.log
setopt APPEND_HISTORY
setopt SHARE_HISTORY
setopt INC_APPEND_HISTORY
I've played around with hist.c & init.c with various
functions and couldn't quite get this behaviour, so I was hoping for a
few pointers from anyone? I've looked at 'init_misc' in
init.c and tried simple things like:
dosetopt(SHAREHISTORY, 1, 1);
dosetopt(INCAPPENDHISTORY, 1, 1);
and in 'hist.c', I've used
char *new_hf = "/opt/some_location/.user.log"
setsparam("HISTFILE", ztrdup(new_hf));
in a few different places, but didn't seem to do the trick. At
this point, i get a ".user.log.LOCK" file created in the proper place,
but nothing gets written to ".user.log" even after the shell is exitted.
Any suggestions/info/comments would be greatly appreciated.
Thanks,
Joe.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author